MSFN Forum: Need help with SetupComplete.cmd - MSFN Forum

Jump to content


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

Need help with SetupComplete.cmd

#1 User is offline   Tomorrow 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 357
  • Joined: 20-December 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 January 2013 - 01:05 AM

I sucessfully inserted SetupComplete.cmd to the WIM @ Windows\Setup\scripts and by the looks it ran for about 6 minutes (setupact.log says so), but most of the commands were ignored.
I made it call 2 .VBS batch files in the scripts directory, but from what i saw neither were executed. Alse the .REG files were not imported. Only the unattended files were cleaned up and WinSAT was run.

Attached zip with setupcomplete,setupact and the 2 vbs files. One of the VBS should have shown a progress bar for the setupcomplete progress and the second should have cleaned the taskbar of the default pinned icons like WMP and so on. Can anyone guess as to what went wrong?

Attached File(s)




#2 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,690
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 10 January 2013 - 09:31 AM

View PostTomorrow, on 10 January 2013 - 01:05 AM, said:

One of the VBS should have shown a progress bar for the setupcomplete progress and


See this for guidance: Add a Custom Script to Windows Setup

Notice it says that setupcomplete.cmd runs using the LOCAL SYSTEM priviledge. Because of Session 0 Isolation, anything running under this type of account is prohibited to interact with the Desktop. So to sum it up, you won't see a progress bar for example.

Try using FirstLogonCommands instead.

#3 User is offline   Tomorrow 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 357
  • Joined: 20-December 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 January 2013 - 09:45 AM

View PostTripredacus, on 10 January 2013 - 09:31 AM, said:

View PostTomorrow, on 10 January 2013 - 01:05 AM, said:

One of the VBS should have shown a progress bar for the setupcomplete progress and


See this for guidance: Add a Custom Script to Windows Setup

Notice it says that setupcomplete.cmd runs using the LOCAL SYSTEM priviledge. Because of Session 0 Isolation, anything running under this type of account is prohibited to interact with the Desktop. So to sum it up, you won't see a progress bar for example.

Try using FirstLogonCommands instead.


I am already using FirstLogonCommands in my autounattend file but for obvious reasons i just dont want to bloat the xml file with hundreds of lines of extra code. I have a few commands now that do some essential stuff like resizing the pagefile,disabling hibernation,DEP and automatic pagefile management.
Still it would be good to get the SetupComplete to work.

Regarding the progressbar:

Quote

"ProgressBar.vbs" - Is a script that uses the IE rendering engine to display a bouncing-box progress bar for while the scripts in the "setupcomplete.cmd" are running. Normally, this is just a black screen. Without some sort of on-screen notification, we've had a few people think the computer is "broken" and reboot it - which breaks the deployment.




#4 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,690
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 10 January 2013 - 09:58 AM

View PostTomorrow, on 10 January 2013 - 09:45 AM, said:

but for obvious reasons i just dont want to bloat the xml file with hundreds of lines of extra code.


Well then don't! Why wouldn't this work for you?

			<FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Description>Run First Setup stuff</Description>
                    <CommandLine>cmd /C start /wait c:\folder\setupstuff.cmd</CommandLine>
                </SynchronousCommand>
            </FirstLogonCommands>


Only one command, but that .CMD handles everything.

#5 User is offline   WinOutreach4 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 22-March 12
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 January 2013 - 11:06 AM

Another method to accomplish your goals would be to use the Microsoft Deployment Toolkit (MDT) for your deployments. MDT allows you to run 'PostInstallation' tasks. This will allow your scripts to run during the deployment process while not having to modify your answer file at all.


In addition, MDT can install software, updates and manage device drivers for you. No need to keep separate images for different departments based on software needs. Applications groups can be configured and selected at deployment to configure the image as needed. MDT can also deploy Windows XP, Vista, 7, 8, Server 2003, 2008, 2008 R2 and 2012. This allows you to manage all of your OS deployments in one convenient tool. It also integrates with WDS for PXE deployments and multicasting, and SCCM for Zero-Touch installations.


This short video (4:21) will give a quick overview of how MDT can help you save time and effort in your deployments: Deployment Workbench in Microsoft Deployment Toolkit 2010


More information about the benefits of MDT can be foundon the Deliver and Deploy Windows 7 page of the Springboard Series on TechNet.

Hope this helps,

David
Windows Outreach Team – IT pro


This post has been edited by WinOutreach4: 11 January 2013 - 11:11 AM


#6 User is offline   Tomorrow 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 357
  • Joined: 20-December 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 January 2013 - 08:33 PM

Both good ideas. Will look into those as soon as i can and report back.


Share this topic:


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

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



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