How to use WScript.Shell in Delphi Scripts
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2013
04:46 AM
01-17-2013
04:46 AM
How to use WScript.Shell in Delphi Scripts
Hello,
I am unable to use WScript.Shell to run a command whose name contains spaces.
It works fine using short notation. What is the syntax to quote correctly?
Sys.OleObject('WScript.Shell').Run('C:\Progra~1\Compan~1\exec.exe option1 option2');
I am unable to use WScript.Shell to run a command whose name contains spaces.
It works fine using short notation. What is the syntax to quote correctly?
Sys.OleObject('WScript.Shell').Run('C:\Progra~1\Compan~1\exec.exe option1 option2');
Pascal Quesseveur
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2013
02:16 AM
01-18-2013
02:16 AM
Sorry for the noise.
Sys.OleObject('WScript.Shell').Run('"C:\Program Files\Company \exec.exe" option1 "option2"');
works fine.
Sys.OleObject('WScript.Shell').Run('"C:\Program Files\Company \exec.exe" option1 "option2"');
works fine.
Pascal Quesseveur
