PC Review


Reply
Thread Tools Rate Thread

Is it a bug ?

 
 
Someone
Guest
Posts: n/a
 
      13th Jul 2005
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


 
Reply With Quote
 
 
 
 
Martin Grossen, eMVP [AVNET Silica]
Guest
Posts: n/a
 
      17th Jul 2005
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
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 AM.