0

I can open EXE using following way. But sometimes, path is not fixed. If user change the installation path, following code will be useless.

Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Exec("C:\Program Files (x86)\MyAppFolder\MyApp.exe") 
Set objShell = Nothing

I have referred following links as suggested

1- Launch programs whose path contains spaces : But this suggest using path or using Run. In my case path is not fixed. User is free to install application anywhere. I have tried using Run as given in that link but my application doesn't open from Run as example suggests

2- How to get program files environment setting from VBScript : This link also contains some solution to get Program File path. But as I said above user is free to install anywhere.

Please suggest how to open EXE if path is not predecided.

Community
  • 1
  • 1
Nanji Mange
  • 2,155
  • 4
  • 29
  • 63

0 Answers0