Jump to content

$oem$\$$\Setup\Scripts\setupcomplete.cmd


Recommended Posts

Just wanted to share something I learned in Windows Vista unattended setup. I put a setupcomplete.cmd under:

Distribution\Operating Systems\Windows Vista\sources\$oem$\$$\Setup\Scripts

This allows me to run a cleanup.cmd that cleans things up in my vista unattend installs. You could use this for other things as well like installing applications or running .net applications. I found this spot to work better than in the unattend.xml run synchronous under specialize microsoft-windows-deployment.

The setupcomplete.cmd runs later in the unattend process.

Matt

Link to comment
Share on other sites


are there any limitations to this file?

I am trying to use it to install apps, but it runs the first 3 lines of the cmd and then nothing else. I don't see any errors in setupact.log, but it only runs the first 3 lines of the Setupcomplete.cmd.

Link to comment
Share on other sites

I needed to run one bat file and one cmd file in my setupcomplete.cmd and at first I noticed only one was being exectued.

Here is what I did to get both to launch

test.bat & test.cmd

instead of

test.bat

test.cmd

The & ran both files.

Link to comment
Share on other sites

the issue I have is that I have a cmd with about 10 lines. The first 2 are net use commands to map drives using specified credentials and then the rest are app install commands. line 3 installs Adobe Reader 8 and that gets installed, but none of the other lines are executed.

The log c:\Windows\panther\unattedGC\Setupact.log shows Setupcomplete.cmd was found and run, but no other info.

Link to comment
Share on other sites

In the Windows AIK help file here is what is says about the setupcomplete.cmd, It does not talk about limitations in how many commands it can hold. Google does not give any info on this either but I am sure there is something going on for you.

I did put a exit command at the bottom of my setupcomplete.cmd

Maybe try putting all your commands (but the net use keep those in setupcomplete.cmd) in a seperate bat or cmd file and have setupcomplete.cmd call that file and see if that works.

Matt

------------------------------------------------------------------------------------------------------------------------------------------------------

Run a Custom Script after Windows Setup CompletesYou can make further customizations after Windows Setup completes by adding commands to the %WINDIR%\Setup\Scripts\SetupComplete.cmd file. This file enables you to install additional applications, run custom Windows scripts (cscript/wscript), or make other modifications to the system before a user logs on.

Note:

Commands in the Setupcomplete.cmd file are executed with local system privilege.

After Windows is installed, but before the logon screen appears, Windows Setup searches for the SetupComplete.cmd file in the %WINDIR%\Setup\Scripts\ directory.

If a SetupComplete.cmd file is found, the file is executed. Otherwise, installation continues normally. Windows Setup logs the action in the Setupact.log file.

Note:

You cannot reboot the system and resume running SetupComplete.cmd.

Setup does not verify any exit codes or error levels in the script after executing SetupComplete.cmd.

The functionality of Setupcomplete.cmd differs from the RunSynchronous and RunAsynchronous commands in that Setupcomplete.cmd runs after Windows Setup completes while the RunSynchronous and RunAsynchronous commands run during Windows Setup.

Link to comment
Share on other sites

tsk tsk :no:

fail totally to see why you'd even use this, run your app's, run cleanup.cmd, and anything else never touching this iffy junk MS threw in

done said it several times in these posts Firstlogon.cmd, as an Admin with all right's and at the end run cleanup.cmd

Link to comment
Share on other sites

  • 2 weeks later...
said it several times in these posts Firstlogon.cmd, as an Admin with all right's and at the end run cleanup.cmd

Yes, you've said it a lot but how about explaining it? ;)

Are you refering to an arbitary cmd file that is executed by the runonce key or something else?

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...