Login | |
|
 |
RE: WshShell.Run Cannot Run String With Spaces - 10/1/2008 4:54:43 AM
|
|
 |
|
| |
Country73
Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
|
Best way to deal with strings that contain spaces. *Echo the line before you run it. This will ensure you have your quotes setup correctly. You can either use CHR(34) for representation of the quotes, or use double "". It all really goes down to preference. Set WshShell = CreateObject("WScript.Shell") 'Comment out your line to test for quotes covering string 'WshShell.Run "C:\STS\Update\Auda Enterprise Gold\AudaEnterpriseGold.exe" wscript.echo "Using double-quotes:" & VBCRLF & """C:\STS\Update\Auda Enterprise Gold\AudaEnterpriseGold.exe""" wscript.echo "Using CHR(34) for quotes:" & VBCRLF & CHR(34) & "C:\STS\Update\Auda Enterprise Gold\AudaEnterpriseGold.exe" & CHR(34) Once you see the entire string has quotes around it, you are ready to RUN.
|
|
| |
|
|
|
 |
RE: WshShell.Run Cannot Run String With Spaces - 11/4/2008 6:29:34 AM
|
|
 |
|
| |
Country73
Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
|
Sorry, been away from here for a while. It's been a LONG time since I've really messed with HTA's. Been doing most of that through AutoIT, which I like all the control it offers. I'll see if I can dig up an old HTA, or work through some code for you.
|
|
| |
|
|
|
|
|