order of items in startup

  • Thread starter Thread starter Bob Brannon
  • Start date Start date
B

Bob Brannon

Is there a way to assign the order in which items in a startup folder or in
msconfig actually startup?
 
Startup folder is alphabetical, Just rename the shortcut
if you have a conflict.
 
You can use a BAT file, and the START command to define the order that
programs load in, or you can run a VBS Script to do the same thing.

Then put a shortcut to the BAT or VBS file in your Startup folder.

BAT sample

START "C:\Programs Files\Internet Explorer\Iexplore.exe"
START "C:\Windows\System32\Notepad.exe"
START "C:\Program Files\My Favorite Program\Favorite Program.exe"

VBS file

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Programs Files\Internet Explorer\Iexplore.exe"
WshShell.Run "C:\Windows\System32\Notepad.exe"
WshShell.Run "C:\Program Files\My Favorite Program\Favorite Program.exe"

Either file type can be created in Notepad, just save it with the
appropriate extension.
 
Thanks for the suggestion!


You can use a BAT file, and the START command to define the order that
programs load in, or you can run a VBS Script to do the same thing.

Then put a shortcut to the BAT or VBS file in your Startup folder.

BAT sample

START "C:\Programs Files\Internet Explorer\Iexplore.exe"
START "C:\Windows\System32\Notepad.exe"
START "C:\Program Files\My Favorite Program\Favorite Program.exe"

VBS file

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Programs Files\Internet Explorer\Iexplore.exe"
WshShell.Run "C:\Windows\System32\Notepad.exe"
WshShell.Run "C:\Program Files\My Favorite Program\Favorite Program.exe"

Either file type can be created in Notepad, just save it with the
appropriate extension.
 
Well I tried you suggestion, adding the start commands to my BAT file and it
leaves command prompt type windows open and does not start one of the
programs. So, I don't know what to do? Any ideas?


You can use a BAT file, and the START command to define the order that
programs load in, or you can run a VBS Script to do the same thing.

Then put a shortcut to the BAT or VBS file in your Startup folder.

BAT sample

START "C:\Programs Files\Internet Explorer\Iexplore.exe"
START "C:\Windows\System32\Notepad.exe"
START "C:\Program Files\My Favorite Program\Favorite Program.exe"

VBS file

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Programs Files\Internet Explorer\Iexplore.exe"
WshShell.Run "C:\Windows\System32\Notepad.exe"
WshShell.Run "C:\Program Files\My Favorite Program\Favorite Program.exe"

Either file type can be created in Notepad, just save it with the
appropriate extension.
 
Oops, I just discovered the problem was that I left the quotes in that you
had at the beginning and ending of the command line. Getting rid of those
fixed it.


Well I tried you suggestion, adding the start commands to my BAT file and it
leaves command prompt type windows open and does not start one of the
programs. So, I don't know what to do? Any ideas?


You can use a BAT file, and the START command to define the order that
programs load in, or you can run a VBS Script to do the same thing.

Then put a shortcut to the BAT or VBS file in your Startup folder.

BAT sample

START "C:\Programs Files\Internet Explorer\Iexplore.exe"
START "C:\Windows\System32\Notepad.exe"
START "C:\Program Files\My Favorite Program\Favorite Program.exe"

VBS file

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Programs Files\Internet Explorer\Iexplore.exe"
WshShell.Run "C:\Windows\System32\Notepad.exe"
WshShell.Run "C:\Program Files\My Favorite Program\Favorite Program.exe"

Either file type can be created in Notepad, just save it with the
appropriate extension.
 
Bob said:
Well I tried you suggestion, adding the start commands to my BAT file and it
leaves command prompt type windows open and does not start one of the
programs. So, I don't know what to do? Any ideas?

Hi

Use a vbs file instead...

There was a minor error in the script example that Doug gave you, because if
there are spaces in the path to the exe, you will need to put a extra set of
quotes around it. And in VBScript, inside a quoted string, you will need two
quotes to get one effective.

Here is an working example:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """C:\Program Files\Internet Explorer\Iexplore.exe"""
WshShell.Run "C:\Windows\System32\Notepad.exe"
WshShell.Run """C:\Program Files\My Favorite Program\Favorite Program.exe"""

' example with spaces in the exe path and parameters to the exe
WshShell.Run """C:\Program Files\MyProg\some.exe"" -p1 -u"

' example with spaces in the exe path and a parameters that needs to be quoted
WshShell.Run """C:\Program Files\MyProg\some.exe"" -p:""c:\my tst"" -u"
 
One step up in the thread you will see that I thought I fixed it but
actually one program still didn't load first even though I listed it first,
thought it did still load. However, I added the "/high" switch to the
program I wanted to load first and the "/belownormal" switch to the program
I wanted to load next, and that seems to have fixed it.

If I have more trouble I may try your suggestion, though I would have to
learn about vbs files first, such as where they go what to name them, how to
start them, etc.

Thanks


Bob said:
Well I tried you suggestion, adding the start commands to my BAT file and it
leaves command prompt type windows open and does not start one of the
programs. So, I don't know what to do? Any ideas?

Hi

Use a vbs file instead...

There was a minor error in the script example that Doug gave you, because if
there are spaces in the path to the exe, you will need to put a extra set of
quotes around it. And in VBScript, inside a quoted string, you will need two
quotes to get one effective.

Here is an working example:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """C:\Program Files\Internet Explorer\Iexplore.exe"""
WshShell.Run "C:\Windows\System32\Notepad.exe"
WshShell.Run """C:\Program Files\My Favorite Program\Favorite Program.exe"""

' example with spaces in the exe path and parameters to the exe
WshShell.Run """C:\Program Files\MyProg\some.exe"" -p1 -u"

' example with spaces in the exe path and a parameters that needs to be
quoted
WshShell.Run """C:\Program Files\MyProg\some.exe"" -p:""c:\my tst"" -u"
 
Bob said:
One step up in the thread you will see that I thought I fixed it but
actually one program still didn't load first even though I listed it first,
thought it did still load. However, I added the "/high" switch to the
program I wanted to load first and the "/belownormal" switch to the program
I wanted to load next, and that seems to have fixed it.

The first program started to load first, nothing else is possible, but I would
think that it is a bit slow to "really" start (so you see it's GUI etc.)

Instead of changing the priority, you could try to do a sleep using ping.exe
(not CPU intensive) between the first and second program. This line in a batch
file will get you a 5 second pause (number behind -n is seconds +1):

ping.exe -n 6 localhost >nul



In VBScript, you can do a 5 seconds pause like this:

WScript.Sleep 5000

If I have more trouble I may try your suggestion, though I would have to
learn about vbs files first, such as where they go

Wherever you want, e.g. in the startup folder if you want it to start
automatically

what to name them,

As long as they end with .vbs, the system is happy, e.g.

tst.vbs

how to
start them, etc.

e.g. in the startup folder or double click on it
 
Bob said:
One step up in the thread you will see that I thought I fixed it but
actually one program still didn't load first even though I listed it first,
thought it did still load. However, I added the "/high" switch to the
program I wanted to load first and the "/belownormal" switch to the program
I wanted to load next, and that seems to have fixed it.

If I have more trouble I may try your suggestion, though I would have to
learn about vbs files first, such as where they go what to name them, how to
start them, etc.

and for both batch files and VBScript (WSH):

Windows Scripting and Batch Programing Resources:
http://www.labmice.net/scripting/default.htm
 
Thank you for your help!

Bob said:
One step up in the thread you will see that I thought I fixed it but
actually one program still didn't load first even though I listed it first,
thought it did still load. However, I added the "/high" switch to the
program I wanted to load first and the "/belownormal" switch to the program
I wanted to load next, and that seems to have fixed it.

The first program started to load first, nothing else is possible, but I
would
think that it is a bit slow to "really" start (so you see it's GUI etc.)

Instead of changing the priority, you could try to do a sleep using ping.exe
(not CPU intensive) between the first and second program. This line in a
batch
file will get you a 5 second pause (number behind -n is seconds +1):

ping.exe -n 6 localhost >nul



In VBScript, you can do a 5 seconds pause like this:

WScript.Sleep 5000

If I have more trouble I may try your suggestion, though I would have to
learn about vbs files first, such as where they go

Wherever you want, e.g. in the startup folder if you want it to start
automatically

what to name them,

As long as they end with .vbs, the system is happy, e.g.

tst.vbs

how to
start them, etc.

e.g. in the startup folder or double click on it
 
Thank you again!


Bob said:
One step up in the thread you will see that I thought I fixed it but
actually one program still didn't load first even though I listed it first,
thought it did still load. However, I added the "/high" switch to the
program I wanted to load first and the "/belownormal" switch to the program
I wanted to load next, and that seems to have fixed it.

If I have more trouble I may try your suggestion, though I would have to
learn about vbs files first, such as where they go what to name them, how to
start them, etc.

and for both batch files and VBScript (WSH):

Windows Scripting and Batch Programing Resources:
http://www.labmice.net/scripting/default.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top