Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Need help with SetupComplete.cmd


  • Please log in to reply
5 replies to this topic

#1
Tomorrow

Tomorrow

    Advanced Member

  • Member
  • PipPipPip
  • 375 posts
  • Joined 20-December 07
  • OS:Windows 7 x64
  • Country: Country Flag
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 Files




How to remove advertisement from MSFN

#2
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,022 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

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.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#3
Tomorrow

Tomorrow

    Advanced Member

  • Member
  • PipPipPip
  • 375 posts
  • Joined 20-December 07
  • OS:Windows 7 x64
  • Country: Country Flag


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:

"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
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,022 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

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.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#5
WinOutreach4

WinOutreach4

    Newbie

  • Member
  • 40 posts
  • Joined 22-March 12
  • OS:Windows 7 x64
  • Country: Country Flag
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


Edited by WinOutreach4, 11 January 2013 - 11:11 AM.


#6
Tomorrow

Tomorrow

    Advanced Member

  • Member
  • PipPipPip
  • 375 posts
  • Joined 20-December 07
  • OS:Windows 7 x64
  • Country: Country Flag
Both good ideas. Will look into those as soon as i can and report back.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users