mason88 Posted January 1, 2008 Share Posted January 1, 2008 Hi, I'm trying to make a program where it launches a .exe from within the same folder as which the program is being run. So say if the program gets installed to D:\program files\etc and then the program is run and you click one of the options to launch another .exe thats in that same folder how would you do it without using the full path e.g. Shell "D:\program files\etc\otherprogram.exe"But so it just runs the otherprogram.exe from the same folder that the main program is installed to. Because the user may not install it to the D: or the C: drive. I hope this makes sense. Link to comment Share on other sites More sharing options...
mason88 Posted January 2, 2008 Author Share Posted January 2, 2008 Is it even possible to launch an application in VB without typing the full path or is there some sort of DLL file u can make so it knows? Link to comment Share on other sites More sharing options...
PityOnU Posted January 8, 2008 Share Posted January 8, 2008 There is a relatively easy fix for this one. If you are using any one of many installer file creators you can have the program check the registry to find the installation path that the user chose.If you re coding the installer yourself, just make sure it creates an "Installatio Directory" value in the directory. Link to comment Share on other sites More sharing options...
mschol Posted January 8, 2008 Share Posted January 8, 2008 VB.net has a special variable for it:My.Application.Info.DirectoryPath()returns the path where the executable that calls it is located Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now