Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Update > Run custom command or script when IE7 is closed

Reply
Thread Tools Display Modes

Run custom command or script when IE7 is closed

 
 
George Valkov
Guest
Posts: n/a

 
      05-16-2007
Hello! I use IE7 on win2k3-SP2 EE.
I want to run this command:
sc stop wuauserv
or as a JavaScript:
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run('sc stop wuauserv', 0, true);
whenever I close InternetExplorer 7.

How can I do it? Is it possible to only run the command when I leave the
windows update web page?




Here is my story:
I want the updates to be available offline for /passive install. And I hate
when that nasty pop-up interrups my work taking my attention every few
minutes! So I have turned off Automatic Updates from System Properties.
And I prefer that the service is stopped when not in use, to free any
resources used by it.

And so:
if the startup mode for "Automatic Updates" service is auto, but the service
is stopped, when I go to www.windowsupdate.com, the service will be started,
everything works fine.
However if the startup mode is manual, even if the service is running, the
web page will show an error. I believe that this requires a fix from
Microsoft? The expected behaviour with Automatic Updates disabled is:
service startup type=manual, start on update site enter, and stop on leave
(or a few minutes after).


As a workaround:
I added this line to my logon script:
sc stop wuauserv
this frees 3 MB! ;-)
almost perfect :-)

It would be perfect if I knew how to run the script again, whenever I close
InternetExplorer :-) or preferably only when I leave the Windows Update web
page.


Thank You for any ideas! :-)


 
Reply With Quote
 
 
 
 
Rob ^_^
Guest
Posts: n/a

 
      05-16-2007
Hi George,

The only way that I can think of is to program your own BHO (browser helper
object) to fire the script when the browser (or tab for tabbed IE7) closes.

Can I suggest turning off automatic updates and then creating a scheduled
task to run Windows Updates once a month at night when you are not using the
'puter?

Regards.
"George Valkov" <> wrote in message
news:%...
> Hello! I use IE7 on win2k3-SP2 EE.
> I want to run this command:
> sc stop wuauserv
> or as a JavaScript:
> var WshShell = new ActiveXObject("WScript.Shell");
> WshShell.Run('sc stop wuauserv', 0, true);
> whenever I close InternetExplorer 7.
>
> How can I do it? Is it possible to only run the command when I leave the
> windows update web page?
>
>
>
>
> Here is my story:
> I want the updates to be available offline for /passive install. And I
> hate
> when that nasty pop-up interrups my work taking my attention every few
> minutes! So I have turned off Automatic Updates from System Properties.
> And I prefer that the service is stopped when not in use, to free any
> resources used by it.
>
> And so:
> if the startup mode for "Automatic Updates" service is auto, but the
> service
> is stopped, when I go to www.windowsupdate.com, the service will be
> started,
> everything works fine.
> However if the startup mode is manual, even if the service is running, the
> web page will show an error. I believe that this requires a fix from
> Microsoft? The expected behaviour with Automatic Updates disabled is:
> service startup type=manual, start on update site enter, and stop on leave
> (or a few minutes after).
>
>
> As a workaround:
> I added this line to my logon script:
> sc stop wuauserv
> this frees 3 MB! ;-)
> almost perfect :-)
>
> It would be perfect if I knew how to run the script again, whenever I
> close
> InternetExplorer :-) or preferably only when I leave the Windows Update
> web
> page.
>
>
> Thank You for any ideas! :-)
>
>



 
Reply With Quote
 
George Valkov
Guest
Posts: n/a

 
      05-17-2007
"Rob ^_^" wrote:
| Hi George,
|
| The only way that I can think of is to program your own BHO (browser
helper
| object) to fire the script when the browser (or tab for tabbed IE7)
closes.
This was good to know! Althow I am too busy to learn how to and program a
BHO right now, I may create one some other time in future.

| Can I suggest turning off automatic updates and then creating a scheduled
| task to run Windows Updates once a month at night when you are not using
the
| 'puter?
Yes, that is how it is! Except for the periode: I check for updates
manually, every day. Just to keep my home server Elite :-)

Thank You very much, Rob!


| Regards.
| "George Valkov" <> wrote in message
| news:%...
| > Hello! I use IE7 on win2k3-SP2 EE.
| > I want to run this command:
| > sc stop wuauserv
| > or as a JavaScript:
| > var WshShell = new ActiveXObject("WScript.Shell");
| > WshShell.Run('sc stop wuauserv', 0, true);
| > whenever I close InternetExplorer 7.
| >
| > How can I do it? Is it possible to only run the command when I leave the
| > windows update web page?
| >
| >
| >
| >
| > Here is my story:
| > I want the updates to be available offline for /passive install. And I
| > hate
| > when that nasty pop-up interrups my work taking my attention every few
| > minutes! So I have turned off Automatic Updates from System Properties.
| > And I prefer that the service is stopped when not in use, to free any
| > resources used by it.
| >
| > And so:
| > if the startup mode for "Automatic Updates" service is auto, but the
| > service
| > is stopped, when I go to www.windowsupdate.com, the service will be
| > started,
| > everything works fine.
| > However if the startup mode is manual, even if the service is running,
the
| > web page will show an error. I believe that this requires a fix from
| > Microsoft? The expected behaviour with Automatic Updates disabled is:
| > service startup type=manual, start on update site enter, and stop on
leave
| > (or a few minutes after).
| >
| >
| > As a workaround:
| > I added this line to my logon script:
| > sc stop wuauserv
| > this frees 3 MB! ;-)
| > almost perfect :-)
| >
| > It would be perfect if I knew how to run the script again, whenever I
| > close
| > InternetExplorer :-) or preferably only when I leave the Windows Update
| > web
| > page.
| >
| >
| > Thank You for any ideas! :-)
| >
| >
|
|


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the command line command for unzipping files? Jim H Windows Vista General Discussion 3 12-04-2008 03:22 AM
Windows Script Host has no script engine for ".js" files Stephan G. Windows Vista General Discussion 9 04-24-2008 08:04 PM
WSUS Command-line or Script for Approvals CompAnVU Windows Update 0 01-09-2006 08:20 PM
Media Player Script Command KB828026 Ed Windows Update 9 06-11-2004 01:59 AM
Sending custom firmware command to the printer device Ram Windows Vista Drivers 0 11-11-2003 10:43 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59