|
How about this?
vbQuote=chr(34)
str="command " + vbQuote + "something" + vbQuote wscript.echo str [Fri 08/13/2004
10:21:00.95]
C:\temp>test Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. command "something"
[Fri 08/13/2004
10:21:08.35]
C:\temp> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Creamer, Mark Sent: Friday, August 13, 2004 10:07 AM To: [EMAIL PROTECTED] Subject: [ActiveDir] (hopefully) quick syntax question Guys, I’m stuck on something that’s probably easy…I’m doing a DC startup script, and it uses the WScript Exec method. The command includes a string with a space, so from a command line, I would normally type: Command “my string”
Since the syntax of the Exec method is ws.exec(“command”), I don’t know how to deal with the quotes. This doesn’t seem to work: Ws.exec(“command “my string””)
How do I build that line properly? Thanks! Mark |
