• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Tomorrow

Need help with SetupComplete.cmd

6 posts in this topic

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?

scripts.zip

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
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.