JeffBeall
asked on
windows 7 startup batch
I want to have a batch file run for everyone that logs into a windows 7 pc.
I put my batch in
C:\ProgramData\Microsoft\W indows\Sta rt Menu
but to test it, i had someone else login to the computer, but the batch didn't run
if that person that signed in goes to
C:\ProgramData\Microsoft\W indows\Sta rt Menu
and double click on the batch file, it works
Any ideas why it doesn't automatically run?
I put my batch in
C:\ProgramData\Microsoft\W
but to test it, i had someone else login to the computer, but the batch didn't run
if that person that signed in goes to
C:\ProgramData\Microsoft\W
and double click on the batch file, it works
Any ideas why it doesn't automatically run?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
JeffBeall--The command you are using will only open the Start Menu. It will not start up the programs in the Start Menu.
I do not understand what you want the batch file to do.
The location for Startup posted by pony10us is correct, but once again will only open the Startup folder, not start the programs is the folder.
There are many locations that start programs at boot.
To name a few
1. HKEY_LOCAL_MACHINE\Softwar e\ Microsoft\Windows\CurrentV ersion\Run
2. HKEY_LOCAL_MACHINE\SOFTWAR E\Microsof t\Windows\ CurrentVer sion\RunOn ce
3. HKEY_CURRENT_USER\Software \Microsoft \Windows\C urrentVers ion\Polici es\Explore r\Run
4. the "load=" line in the [windows] section in C:\Windows\WIN.INI
5. the "run=" line in the [windows] section in C:\Windows\WIN.INI
6. HKEY_LOCAL_MACHINE\Softwar e\ Microsoft\Windows\CurrenTV ersion\ RunServices
7. HKEY_CURRENT_USER\Software \ Microsoft\Windows\CurrenTV ersion\Run
8. HKEY_CURRENT_USER\Software \Microsoft \Windows\C urrentVers ion\RunOnc e
9. C:\Windows\AllUsers\StartM enu\ Programs\Startup
10. C:\Windows\StartMenu\Progr ams\ Startup
11. C:\Users\Username\AppData\ Roaming\Mi crosoft\Wi ndows\Star t Menu\Programs\Startup
For 64-bit Windows 7 only:
HKEY_LOCAL_MACHINE\SOFTWAR E\Wow6432N ode\Micros oft\Window s\CurrentV ersion\Run
AND
HKEY_LOCAL_MACHINE\SOFTWAR E\Wow6432N ode\Micros oft\Window s\CurrentV ersion\Run Once
I do not understand what you want the batch file to do.
The location for Startup posted by pony10us is correct, but once again will only open the Startup folder, not start the programs is the folder.
There are many locations that start programs at boot.
To name a few
1. HKEY_LOCAL_MACHINE\Softwar
2. HKEY_LOCAL_MACHINE\SOFTWAR
3. HKEY_CURRENT_USER\Software
4. the "load=" line in the [windows] section in C:\Windows\WIN.INI
5. the "run=" line in the [windows] section in C:\Windows\WIN.INI
6. HKEY_LOCAL_MACHINE\Softwar
7. HKEY_CURRENT_USER\Software
8. HKEY_CURRENT_USER\Software
9. C:\Windows\AllUsers\StartM
10. C:\Windows\StartMenu\Progr
11. C:\Users\Username\AppData\
For 64-bit Windows 7 only:
HKEY_LOCAL_MACHINE\SOFTWAR
AND
HKEY_LOCAL_MACHINE\SOFTWAR
ASKER
Sorry, I didn't see your entry.
I put my batch file in
C:\ProgramData\Microsoft\W indows\Sta rt Menu\Programs\Startup
and it does run when someone logs in.
It's just a simple batch that runs this command
rundll32 printui.dll,PrintUIEntry /y /n "\\apc001\D01MIS01Z1"
which changes the default printer to D01MIS01Z1 which is on server apc001
I put my batch file in
C:\ProgramData\Microsoft\W
and it does run when someone logs in.
It's just a simple batch that runs this command
rundll32 printui.dll,PrintUIEntry /y /n "\\apc001\D01MIS01Z1"
which changes the default printer to D01MIS01Z1 which is on server apc001
Actually, I gave the quick easy answer based on your trying to put it in the startup folder to begin with. That is an old method of doing it that is still used a lot today. However as jcimarron pointed out, there are several other methods available to accomplish the same task.
ASKER
so i played around and put a reg entry in
HKEY_LOCAL_MACHINE\Softwar e\ Microsoft\Windows\CurrentV ersion\Run
and that works fine too. So is there some advantage to using the registry instead of the startup folder?
HKEY_LOCAL_MACHINE\Softwar
and that works fine too. So is there some advantage to using the registry instead of the startup folder?
One advantage to using the registry is that the executable can reside anywhere on the system. You just need to either have the location in the path statement or use the full path to the executable in the reg entry.
For example, I may want to have a single folder for all my batch files. I could keep that file in this folder and point the reg entry to that folder to execute it at startup. That way I always know where to find any of my batch files instead of hunting all through the system.
For example, I may want to have a single folder for all my batch files. I could keep that file in this folder and point the reg entry to that folder to execute it at startup. That way I always know where to find any of my batch files instead of hunting all through the system.
ASKER
That did the trick, thank you.