Jump to content

Recommended Posts

Posted

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


Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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

  • 2 weeks later...
Posted
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?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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