--- In [email protected], "quantiworks" <quanticwo...@...> wrote:
>
> I use a batch file to enable the Automatic Updates service,
> launch IE, and then disable again the service.
> 
> For this I've using "sc (Service Control)" in a batch file which you
> can see below.
> 
> ======sart script======
> 
> sc \\MACHINENAME config wuauserv start= auto
> sc start wuauserv
> start /max /wait iexplore 
> http://update.microsoft.com/windowsupdate/v6/default.aspx?ln=en-us
> sc \\MACHINENAME config wuauserv start= demand
> sc stop wuauserv
> exit
> 
> ======end script======
> 
> Now, I've been slowly reading the PPST and I want to adapt some of my simple 
> scripts to PowerPro scripts
> 
> Right now, I have some commands working using Do and Wait.For
> but I'm not getting the sc \\MACHINENAME to work.
> Is it possible to use the 1st command under Do()?
> 
> I know that: "?" is used to escape: "\"
> I tried using it but still can't get it to pass the command.
> 

A literal string can contain a backslash; a literal string starts with a 
question mark and is delimited by the character following the question mark. 
Without using a literal string, a backslash escapes a backslash. All assuming 
you use standard configuration which uses backslash as escape char.

So, I imagine either of these would work:

do("sc", ?"\\MACHINENAME config wuauserv start= auto")

or

do("sc", "\\\\MACHINENAME config wuauserv start= auto")

Regards,
Sheri

Reply via email to