Jump to content

Recommended Posts

Posted

Ok, so I am trying to make a seemingly simple shortcut. As can be seen in my code snippet.

The target of the .lnk should look like this: %comspec% /c start "" "C: blah blah blah \script.exe"

Instead what I get is this: "%comspec% /c start "" "C: blah blah blah \script.exe"

Any ideas how to get rid of that leading quotation mark?

FileCreateShortcut('%comspec% /c start ' & '""' & ' "' & @DesktopDir & "\" & $Unpack & '.exe"', @DesktopDir & "\" & $Unpack & ".lnk","","","","","{F6}")

 

Posted

The program in opening with the shortcut is my script.exe. Running it through comspec just made it open a new instance of the script instead of just making it active if it is already open. My script.exe looks for other instances of itself and closes them right when it starts. If I try to run the shortcut with a hot key it doesn't open a new instance. It makes the current one active. I want it to open a new instance. 

Posted

This was the solution I found for this issue. If I manually make a shortcut with a target of :  %comspec% /c start "" "C: blah blah blah \script.exe" then the program will run as a new instance with the shortcut. 

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...