Jump to content

FileCreateShortcut is adding a " at the beginning of the target


alexm963
 Share

Recommended Posts

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}")

 

Link to comment
Share on other sites

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. 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...