Jump to content

Windows 7 ALLUSERS\Startup


Trouble24

Recommended Posts

I am in the midst of a large environment deployment of Windows7. So, here we go with facts:

1. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup is used to place start up scripts (batch/vb/ect) so when a user logs on the scripts will run.

2. I load a batch file here to complete post installation activities (RunPost.cmd.lnk) which points to C:\POST

I was not having any problems with my original builds with this working. I updated my last image to include RSAT and some MS updates and now anything in the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup will execute.

Notes:

1. UAC is OFF

2. Firewall is OFF

3. Defender is disabled

4. I support XP and 7 and do not wish to use Runonce/Run as my XP build would be different.

Any thoughts will be greratly appr't'd.

Link to comment
Share on other sites


I am not certain where the issue is, maybe you mistyped something? Anyways, here is an example of how I handle multiple OS versions.

As we know, the startup folder is a different path between Windows 7 and XP. In my deployment program, I have a single EXE that goes into the appropriate startup folder. When the OS boots for the first time, the program detects the installed OS and sets variables or runs commands as are appropriate for that OS. This is (at least) important for when you need to have the app delete itself so that it doesn't run on the next reboot.

Link to comment
Share on other sites

@Tripredacus, thx and great idea for os support going forward.

The larger question I have is why my batch file will run under Windows 7 (let's say RC1.0) and not under Windows 7 (let's say RC1.5).

Wondering if you have ever heard a batch/exe not executing when user logs on to the system?

Thx again.

Link to comment
Share on other sites

There could be any number of reasons. First thing you may try if you are using a batch file (you should use .cmd not .bat) is to run it with a wrapper, such as:

statup.cmd > c:\users\public\statup.log

To see where there may be a failure. Also you can try look in Event Viewer to see if something shows up there. I use EXE for all my deployment scripts because sometimes a .cmd will not run at the correct level I would want it to. Also with EXE it is easier to do a runas if needed but you might be able to do with .cmd.

Link to comment
Share on other sites

Gave that try, WOW what a surprise when one adds logging. I have logging in all my scripting yet lacked the 1st step in troubleshooting.

This is the results:

Script Starting Point:::::::::::::::::::::::

Please wait while maintenance functions are performed...

Post Config Startup Link was NOT copied successfully

** ERROR ** (GOTO ...... and stop processing the script any further)

Detected missing Post Config file as noted above.

Contact Desktop Engineering for assistance

Press any key to log out of Windows

Script Ending Point::::::::::::::::::::::::

Now, here's a good one. This script runs fine on Win7 WITHOUT RSAT installed. After RSAT is installed, script stops working (above ERRLOG). I guess now it's understanding what RSAT does to my perms...

You're awesome, thank you for the pointer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...