quessevOccasional Contributor13 years agoHow to use WScript.Shell in Delphi ScriptsHello,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');
1 ReplyReplies sorted by Most LikedquessevOccasional Contributor13 years agoSorry for the noise.Sys.OleObject('WScript.Shell').Run('"C:\Program Files\Company \exec.exe" option1 "option2"');works fine.
quessevOccasional Contributor13 years agoSorry for the noise.Sys.OleObject('WScript.Shell').Run('"C:\Program Files\Company \exec.exe" option1 "option2"');works fine.
Recent DiscussionsFind and Use a Sibling Object Starting from an AliasChild ObjectName Mapping not Working in Latest VersionThere was an attempt to perform an action on a zero-sized window
Related ContentAQTime Delphi 11.X SupportOrd function in delphi script (TC 6.52)Delphi Split function