Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

When Assembly name has spaces shortcuts wont work

Open jordyvaneijk opened this issue 9 years ago • 4 comments

If I have a space in my Assembly name (I.E.: Hello World) then my applications executable will be Hello World.exe When the startmenu shortcuts are created the Taget at that time will be something like: C:\PathToApplication\Update.exe --processStart Hello World.exe This will give the following exception while trying to start the application from the startmenu

2016-05-26 09:24:57> Program: File C:\PathToApplication\app-1.0.0.3\Hello doesn't exist in current release 2016-05-26 09:24:57> Unhandled exception: System.ArgumentException: Value does not fall within the expected range. at Squirrel.Update.Program.ProcessStart(String exeName, String arguments, Boolean shouldWait) at Squirrel.Update.Program.executeCommandLine(String[] args) at Squirrel.Update.Program.main(String[] args)

This can be fixed by putting puting qoutes around the executables name in the Target of the shortcut C:\PathToApplication\Update.exe --processStart "Hello World.exe". Maybe this can be fixed?

jordyvaneijk avatar May 26 '16 08:05 jordyvaneijk

Tested this and same issue, checked around and noted that this has been reported and reported fixed a few times but it still seems to be an issue and is easy to repeat.

  1. Create a new windows forms solution with a space in the solution name
  2. add squirrel package
  3. create nupkg
  4. squirrel releasify
  5. run setup.exe
  6. app will run the first time but shortcut is broken with no quotations for the assembly name with a space, manually correcting the shortcut makes it work until an update.

Attempted to change application to 'SquirrelAwareVersion' and manually call events and CreateShortcutForThisExe's but effect was the same. Calling the CreateShortcutsForExecutable with an override exe reference produces the same and attempting to add in 'quotation' marks to the function call results in no creation of shortcuts.

The only real solution at the moment appears to be changing your assembly name to remove spaces.

hermyt avatar Jul 09 '16 00:07 hermyt

Consider the PR #1401 that attempts to fix this issue.

Thieum avatar May 03 '19 14:05 Thieum

Consider also the possible back and forth with %20 in #1141

Thieum avatar May 03 '19 14:05 Thieum

To me it looks like this was probably fixed in https://github.com/Squirrel/Squirrel.Windows/pull/670.

nikwen avatar Nov 28 '24 18:11 nikwen