|
Re: Vista and VBScript
Yes, I do see what you mean. I agree it could be a bug. Somethings work as
expected on Vista: "start /wait notepad.exe" does indeed wait, while: "start
/wait iexplore.exe" does not wait.
"Alexander Suhovey" wrote:
> This problem seems to be related rather to the way control.exe works on
> Vista than to VBScript. You should see what I mean if you run following
> command at command prompt under both operating systems:
>
> start /wait wscui.cpl
>
> In Windows XP cmd will wait for Security Center to close while in Vista
> abovementioned command exits immediately.
>
> If you ask me I'd call it a bug. If it is not a documented change of course.
>
> --
> Alexander Suhovey
>
>
> "dak" <dak@discussions.microsoft.com> wrote in message
> news:931D6AE4-5906-48D0-B319-91B10EFAC63D@microsoft.com...
> > VBScript seems to run differently on Vista than on XP. Here is a little
> > VBscript to launch the Security Center on Windows. When run on XP, the
> > security center appears and the "Done" message does not appear until the
> > security center is closed. On Vista the "Done" message appears and then
> > the
> > security center appears. Is this working as designed? If so, can I change
> > the
> > default behavior?
> >
> > --------------------------------
> > ' launch security center
> > Option Explicit
> > On Error Resume Next
> >
> > Dim objShell
> > Dim nReturnCode, fname
> >
> > '
> > ' Start the security center control panel
> > '
> > Set objShell = WScript.CreateObject("WScript.Shell")
> > fname = "%ComSpec% /C " + WScript.Path + "\wscui.cpl"
> > nReturnCode = objShell.Run(fname, 0, TRUE)
> >
> > msgbox "done"
> > --------------------------------------
> >
>
>
|