hi,
How do you make a exe open and run in a different directory in vb6?
so my exe is in the directory
D:\test.exe
and want it to run in the directory
C:\
without copying the file there

You can't.

could you do it if i allowed you to copy the file there and it got deleted when you end the program

VB6 will not allow you to do this, you should look into .Net that allows you to have an AppDomain Shadow Copying that you can run your application from "C:\MyApp\" but the binaries get copied then loaded into a CachePath (which you specify) where your application is actually running. This way you can update your binaries without worrying about handles still open to them, this is basically doing what you want it to do.

Check out this: http://msdn.microsoft.com/en-us/library/ms404279.aspx

thanks ill have a look into that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.