Scripting Question

Feature Request: Ability for sysprep creator to run custom powershell files before sysprepping or select custom unattend answer file.

07/25/2019 595 views

I Like the Sysprep Executor utility  as it's fairly intuitive and user friendly when it's being ran prior to a capture, it however has a few barriers preventing me from using it.

- Custom Unattend answer file.

I have a few answer files created manually in WSIM as use a few settings that are not available in the Sysprep Creator menu, would it be possible to add an option to sysprep creator to select an unattend XML file instead of generating one via the menu options?

- Support for custom .bat,.cmd or .ps1 files prior to capture.

I have a script that I run before sysprep that performs the following tasks, not all of these are currently included within Sysprep executor. Would it be possible to add the ability to Sysprep Executor to run a custom script prior to running sysprep.exe so that I can automate the steps it does not natively cover?

* Close explorer.exe

* Verify bitlocker is off.

*Verify there is not a pending reboot

* Verify there is atleast 1 rearm remaining

* Verify VMWare tools is not installed.

* Verify the system is not a domain member.

* Reset McAfee's Agent GUID (A new one will be generated after next reboot, during the sysprep process)

* Remove windows Update Client ID's

* Stop the KACE agent (If installed) and remove the KUID  (A new one will be generated after next reboot, during the sysprep process)

* Stop windows media player network sharing service and ensure it's startup is set to manual.

* Delete recent file history.

* Delete RDP connection history.

* Clear out Microsoft Office application MRU list

* Clear out types paths in windows explorer

0 Comments   [ + ] Show comments


Community Chosen Answer

Answered 07/25/2019 by: Channeler
Red Belt

All Answers


Create your answer file and just use a batch file to start the sysprep.

Here is the batch file I use.

Dism /Online /Export-DefaultAppAssociations:c:\temp\AppAssoc.xml

powershell –ExecutionPolicy Bypass Export-Startlayout -path c:\temp\layout.xml

start /wait notepad.exe C:\Windows\w2d\tmccimageversion.reg

start /wait regedit /s C:\Windows\w2d\tmccimageversion.reg

start /wait regedit /s C:\Windows\w2d\sus.reg

sysprep /generalize /oobe /shutdown /unattend:c:\windows\system32\sysprep\adminw10x64.xml

Answered 07/26/2019 by: SMal.tmcc
Red Belt


I like your suggestion of running a custom script.  I'll look into that, though I was going to start rewriting it in c#.

As to the custom unattend file, you can choose it from wherever you like, there is a browse button.  If there is an unattend file in the same location of sysprep executor it selects that one automatically, but you can use whatever file you want.

Answered 07/27/2019 by: cserrins
Red Belt

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ