Sign in with
Sign up | Sign in
Your question

Delay startup items

Tags:
  • Internet Connection
  • Windows XP
Last response: in Windows XP
Share
July 27, 2005 7:02:02 AM

Archived from groups: microsoft.public.windowsxp.general (More info?)

Any ideas how I can delay the running of some startup items? As an example,
MSN messenger runs and attempts to log in before my internet connection is
active and therefore returns an error everytime I turn on my PC.

I would have thought that theres a switch I could add after the shortcut
command.

Thanks guys.

Matt

More about : delay startup items

Anonymous
July 27, 2005 11:50:21 AM

Archived from groups: microsoft.public.windowsxp.general (More info?)

See

http://groups-beta.google.com/group/microsoft.public.wi...

for a general solution.
For the example you give, however, I would use something like the following
before you run messenger. Be aware it will result in an endless loop if for
some reason the connection cannot be establised (use Ctrl+C to cancel).

:Retry
for /f "eol=C tokens=*" %%i in ('rasdial') do set test=%%i
if /i "%test%"=="No connections" goto Retry

"MJ" <MJ@discussions.microsoft.com> wrote in message
news:6D844361-C9B4-4510-AB14-9CAFFB0AB998@microsoft.com...
> Any ideas how I can delay the running of some startup items? As an
> example,
> MSN messenger runs and attempts to log in before my internet connection is
> active and therefore returns an error everytime I turn on my PC.
>
> I would have thought that theres a switch I could add after the shortcut
> command.
>
> Thanks guys.
>
> Matt
>
July 27, 2005 6:22:00 PM

Archived from groups: microsoft.public.windowsxp.general (More info?)

Firstly, uncheck the option within MSN that starts it when starting Windows
(Tools > Options > General)

A .vbs script (shortcut in startup folder) like this would delay the startup
by an arbitrary number of milliseconds (in this case 30000 = 30 seconds)

'************************************************
set WshShell = WScript.CreateObject("WScript.Shell")

'Wait 30 seconds
wscript.sleep 30000

'Run MSN
wshshell.Run """C:\Program Files\MSN Messenger\msnmsgr.exe"""
'**************************************************

Alternatively, you could have a startup script (again .vbs) that tested for
an active internet connnection, such as

'**********************************************************
set WshShell = WScript.CreateObject("WScript.Shell")
set ipfinder = createobject("rcbdyctl.setting")

do
wscript.sleep 5000
loop until online = true

'Run MSN
wshshell.Run """C:\Program Files\MSN Messenger\msnmsgr.exe"""

Function online

online = false
ipaddress = ipfinder.GetIPAddress
if len(trim(ipaddress))<>0 then online = true

End Function
'**********************************************************

Jon



"MJ" <MJ@discussions.microsoft.com> wrote in message
news:6D844361-C9B4-4510-AB14-9CAFFB0AB998@microsoft.com...
> Any ideas how I can delay the running of some startup items? As an
> example,
> MSN messenger runs and attempts to log in before my internet connection is
> active and therefore returns an error everytime I turn on my PC.
>
> I would have thought that theres a switch I could add after the shortcut
> command.
>
> Thanks guys.
>
> Matt
>
!