MSFN Forum: VB launching application within its own folder - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

VB launching application within its own folder Rate Topic: -----

#1 User is offline   mason88 

  • Group: Members
  • Posts: 2
  • Joined: 01-January 08

Posted 01 January 2008 - 04:51 PM

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.


#2 User is offline   mason88 

  • Group: Members
  • Posts: 2
  • Joined: 01-January 08

Posted 02 January 2008 - 07:10 AM

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?

#3 User is offline   PityOnU 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 26-July 07

Posted 08 January 2008 - 02:14 PM

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.

#4 User is offline   mschol 

  • Group: Members
  • Posts: 8
  • Joined: 25-December 07

Posted 08 January 2008 - 03:18 PM

VB.net has a special variable for it:
[code]
My.Application.Info.DirectoryPath()
[/quote]

returns the path where the executable that calls it is located

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy