![]() If the file path parameter is enclosed in single quotes or no quotes are used, the. If the file path parameter is enclosed in double quotes, or ay double quote used after the. Select all Open in new window My conclusion is that, for whatever reason, nircmd's elevate function has problems with. bat script at all SET FilePath=C:\Windows\System32\Test File.txt SET Command="C:\Windows\System32\Test Script.bat" "%FilePath%" "C:\Windows\System32\nircmdc.exe" elevate %Command% REM This runs Notepad and the file is opened SET FilePath=C:\Windows\System32\Test File.txt SET Command="C:\Windows\System32\Notepad.exe" '%FilePath%' "C:\Windows\System32\nircmdc.exe" elevate %Command% REM This runs Notepad and the file is opened SET FilePath=C:\Windows\System32\Test File.txt SET Command="C:\Windows\System32\Notepad.exe" "%FilePath%" "C:\Windows\System32\nircmdc.exe" elevate %Command% bat script but the system breaks apart the path into multiple parameters SET FilePath=C:\Windows\System32\Test File.txt SET Command="C:\Windows\System32\Test Script.bat" '%FilePath%' "C:\Windows\System32\nircmdc.exe" elevate %Command% REM This does not call the. Here are the results of my tests: REM This calls the. ![]() Our tests work fine as long as we are not calling a. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |