Hi Jorge
It's not a bug.... it's a feature!
:-)
explorer is part of the main shell and is allways open.
So, it will open the regedit imediately.
Extend your script with a notepad again, and
you will see the correct way...
So, don't start explorer direct.
btw: you can't close explorer.exe....
it's the shell!
--
Martin Grossen, eMVP
AVNET EMG Silica
Franchise Manager Microsoft Embedded Europe
Your competent partner for Microsoft Embedded licencing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Someone" <(E-Mail Removed)> schrieb im Newsbeitrag
news:%23p%(E-Mail Removed)...
> Hi
>
> When i run this vbs script :
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> set objFS = CreateObject("Scripting.FileSystemObject")
> Return = WshShell.Run("notepad ", 1, true)
> return = wshShell.Run ("explorer.exe ", 1, true)
> return = wshShell.Run ("regedit ", 1, true)
>
> Why doesn't the script correctly runs ? it should run regedit only after
> explorer is closed, but it runs both.
> It's XPe with SP1.
>
> Any idea ?
> Thanks in adavnce for any help
>
> Jorge
>
|