Jump to content
mattm14

Open existing instance of program

Recommended Posts

I can open the program required with:

Run("C:\Program Files (x86)\Files\Program.exe")

which is pretty simple.

I have instances of this program stored in a folder, but I cannot open them.

They are stored here:

C:\Users\M\AppData\Local\Program

They all end with lastsession.ses so I tried:

Run("C:\Program Files (x86)\Files\Program.exe -i C:\Users\M\AppData\Local\Program\Name_of_instance\lastsession.ses")

But this didn't work.

Anyone know how I can achieve this?

 

Share this post


Link to post
Share on other sites
25 minutes ago, mattm14 said:

They all end with lastsession.ses so I tried:

Run("C:\Program Files (x86)\Files\Program.exe -i C:\Users\M\AppData\Local\Program\Name_of_instance\lastsession.ses")

But this didn't work.

it will never work as is. Try:

'"C:\Program Files (x86)\Files\Program.exe" -i "C:\Users\M\AppData\Local\Program\Name_of_instance\lastsession.ses"'

;) 

Share this post


Link to post
Share on other sites

Recommend use of macros if you want to share the app:

:: Compile as 32 bit otherwise @ProgramFilesDir will point to the wrong directory.

Run('"' & @ProgramFilesDir & '\Files\Program.exe" -i "' & @LocalAppDataDir & '\Program\Name_of_instance\lastsession.ses"')

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...