MSFN Forum: $oem$\$$\Setup\Scripts\setupcomplete.cmd - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

$oem$\$$\Setup\Scripts\setupcomplete.cmd Rate Topic: -----

#1 User is offline   mattffrost 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 18-July 06

Posted 28 December 2006 - 02:58 PM

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


#2 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 December 2006 - 02:49 PM

Thank you, this is exactly the functionality i was looking for. :D

#3 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,604
  • Joined: 14-November 03

Posted 30 December 2006 - 07:49 PM

Will bookmark our friend.

#4 User is offline   eschloss 

  • Group: Members
  • Posts: 9
  • Joined: 01-June 04

Posted 02 January 2007 - 08:45 AM

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.

#5 User is offline   mattffrost 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 18-July 06

Posted 02 January 2007 - 09:10 AM

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.

#6 User is offline   eschloss 

  • Group: Members
  • Posts: 9
  • Joined: 01-June 04

Posted 02 January 2007 - 11:59 AM

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.

#7 User is offline   mattffrost 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 18-July 06

Posted 03 January 2007 - 09:51 AM

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.

#8 User is offline   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,482
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 January 2007 - 10:12 AM

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

#9 User is offline   eschloss 

  • Group: Members
  • Posts: 9
  • Joined: 01-June 04

Posted 03 January 2007 - 10:16 AM

I just decided to us the RunSynchronous section under the specialize pass and it is all working fine.

#10 User is offline   jamieo 

  • Junior
  • Pip
  • Group: Members
  • Posts: 95
  • Joined: 17-October 04

Posted 17 January 2007 - 05:32 AM

View PostmaxXPsoft, on Jan 3 2007, 10:12 AM, said:

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?

#11 User is offline   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,482
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 17 January 2007 - 08:54 AM

jamieo
http://www.msfn.org/...showtopic=90863
I'll separate to leave this

This post has been edited by maxXPsoft: 17 January 2007 - 09:20 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy