Oren
Tue Aug 17 00:05:35 CDT 2004
Thanks Torgeir
your answer helped me.
Oren
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:O5e3FKvgEHA.3320@TK2MSFTNGP11.phx.gbl...
> Oren Zippori wrote:
>
> > Good day,
> > Im trying to create a script that runs a command line with an argument
the
> > problem is that the argument has space in side it, and im having trouble
> > working out the command line, here is the command with the argument:
> >
> > Set WshShell = WScript.CreateObject("WScript.Shell")
> > rCommand = "runas /user:Domain\suorenz "mmc
> > %windir%\system32\management.msc"'
> > WshShell.Run rCommand, 0, TRUE
> >
> > Thanks in advance
> >
> Hi
>
> Inside a quoted string, you will need to use two quotes to get
> one effective:
>
> Set WshShell = CreateObject("WScript.Shell")
> sCmd = "runas /user:Domain\suorenz ""mmc
%windir%\system32\management.msc"""
> WshShell.Run sCmd, 0, True
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
>
http://www.microsoft.com/technet/scriptcenter/default.mspx