Windows 7 Failing to launch a batch file shortcut as administrator when the directory has a comma in...

  • Thread starter Thread starter NumbStill
  • Start date Start date
N

NumbStill

1. Create a folder named "," (without the quotes).

2. Create a file named "foo.cmd" (without the quotes) with the content "pause" (without the quotes), within the folder that step 1 created.

3. Right click on foo.cmd and choose "Create shortcut".

4. Right click on the created shortcut and choose "Properties".

5. Within the "Shortcut" tab, click on "Advanced...".

6. Tick "Run as administrator".

7. Click on OK to exit the Advanced dialog.

8. Click on OK to exit the Properties dialog.

9. Double click on the shortcut.


Expected -

Press any key to continue . . .


Actual -

The shell window exits immediately. If you open enough of them, you will see that it shows something like (assuming the folder from step 1 is "c:\temp\,") -

'c:\temp\' is not recognized as an internal or external command,
operable program or batch file."


The workaround is to change the name of the folder, obviously, but this is a Windows bug. I understand that posting this here will make some Microsoft staff see it and report it through the internal reporting system. So, please, do.


I do not have Windows 8 and later at the moment, so I cannot see whether it is resolved already in a later version. Sorry.



Thank you!

Continue reading...
 
Back
Top