Sysprep problems on WES 7

kmfraley

New member
Local time
7:13 PM
Messages
22
Hello all,
I am trying to run "sysprep /oobe /generalize" from command prompt (Run as administrator) on my reference machine. It appears to start and run for a while, but my reference machine never reboots. So, I checked the log it generates and it contains errors that I do not understand. Please take a look at the attachments. I could use some help. Thanks.
Kris
 

Attachments

My Computer

OS
Windows Embedded Standard 7
Running sysprep without /reboot switch never reboots, it just shuts the PC down.

I have noticed something a bit weird that I can not explain. In about one third of the times when I've run sysprep in various machines, I get an error message and it stops, or no error message but sysprep does not work. Studying this a bit deeper, I noticed that error almost never occurs when stopping Windows Media Player Network Sharing service. For instance if I get error message when running sysprep, then stop the WMP service and run sysprep again, it usually works.

To stop this service which is started by default, type net stop WMPNetworkSvc to command prompt.

Your logs show nothing exceptional, only that IIS is not able to start because of some conflict in admin rights. Disable IIS before running sysprep?

Kari
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Thanks for the reply Kari. I have the Windows Media Player Network Sharing Service's Startup Type set to Disabled, so when I run "net stop WMPNetworkSvc", I get the message "The Windows Media Player Network Sharing Service service is not started". Makes sense. How do you "Disable IIS"?
 

My Computer

OS
Windows Embedded Standard 7
Ok.

Yeah, that was not so clearly stated. I mean, is there a reason why you need IIS on in your sysprepped image? If not, disable it here:

Disable_IIS.png

Kari
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
No, I do not need IIS in my sysprepped image. Unfortunately, nothing shows up in the Turn Windows features on or off dialog. What's up with that? :) Regardless, the help for the dialog seems to indicate that IIS is turned off by default. I think it comes down to why this really happened ...

2011-01-05 14:48:14, Error [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:\Windows\System32\inetsrv\iissyspr.dll,IIS_Generalize', returned error code -2146893818

Any ideas? Other ideas?
 

My Computer

OS
Windows Embedded Standard 7
Could you shortly summarize what are you trying to do? Are you preparing Windows to deployment? Are you running sysprep in Audit Mode? Have you run some unattend xml-scripts?
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Looking at what it's doing and knowing what iissyspr.dll does (resets IIS password and security information on the metabase, thus "generalizing" it for sysprep redeployment), and that it's a registry error, I'm wondering if perhaps the IIS admin service is installed but not running, or perhaps not installed at all? The state of the IIS Admin service when sysprep is run does cause this error (if it is running, stop it - if it is not running, start it; I cannot remember which state was the problem state, but I had this exact issue on W2K8 and the state of this service was the key during sysprep).
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
cluberti,

The IIS Admin Service appears in the list of services and it's Startup type is set to Automatic; Service status is set to Stopped. When I attempt to manually start the service, it does not start and an error is reported in the Event Viewer-->Windows Logs-->System log saying, "The IIS Admin Service service terminated with service-specific error %%-2146893818." Same error as reported during attempt to run sysprep. What is the "friendly" meaning of error code -2146893818?

Kari,

Okay, short summary ... Using ICE, I am building a WES 7 image for custom hardware developed by my company. The same image will be installed on ALL manufactured hardware units. The approach I am using is as follows...

  1. load the image with the unattend file created by ICE
  2. install various applications that support our custom application
  3. perform some other generic customizations (group policy)
  4. run "sysprep /oobe /generalize" from command line on a reference target (note that I have also tried to run "sysprep /audit", but I get the same error.
  5. duplicate the compact flash (in place of HDD) for mass deployment
When using Windows XP embedded on our older systems, implementation of step 4 was performed using "fbreseal".

Is my approach correct? It is similar to that found at ...
What Is Sysprep?
... under "Creating a Build-to-Order (BTO) Windows Image" section.

Thanks for your help guys. Much appreciated!
 

My Computer

OS
Windows Embedded Standard 7
I can not see anything wrong in your approach. That's how I would do it. But, in total honesty, I am no expert in this area. I have used WinPE, Audit Mode and sysprep quite a lot but it's all been for imaging and deploying simple systems in my home network of 7 computers and a server. Seven and sysprep really are something different, compared to XP and fbreseal.

Cluberti is far more experienced in this issue, and I believe he is right with that somehow IIS service is the culprit. That also supports my own experience with that WMPNetworkSvc, which logically thinking should have nothing whatsoever to do with sysprepping, but still causes time to time sysprep to fail.

I am very sorry but I can not think anything else. Let's hope Cluberti comes with some fresh ideas.

Kari
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Okay, Kari, I appreciate your honesty and your help! Looking forward to hearing from cluberti. I know that I am not exactly following the technet instructions to the letter, so I think I'll take a step backward with the hope of moving forward. Keep an eye on the forum ... I'm intending to post as new info comes to light.
 

My Computer

OS
Windows Embedded Standard 7
Would be nice to read you've succeeded! Keep us posted.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
That error code in the context of IIS service starting actually means "Access Denied". I'm thinking at this point the sysprep is already partially done, and the machinekeys goo no longer matches the security of the user starting the service, so it fails.

I hate to ask as I know you're working hard on the image and probably have done a lot of pre-req work, but do you really absolutely need to have IIS installed before creating the image? If you're just installing it so that it's there for after the sysprep it would be better to use dism /onlinen to add it post-sysprep. If you absolutely positively MUST have it installed pre-sysprep, we'll have to dig into this. You might be SOL on that image right now though, unfortunately.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Yeah, we are thinking along the same lines. [FONT=&quot]We would like to include MSMQ in the image, but it has a required dependency on IIS 7.0. [/FONT][FONT=&quot]So, as a test, in order to eliminate IIS 7.0, I also have to eliminate MSMQ. [/FONT][FONT=&quot]I wonder what's up with that??? I'll go ahead and create a new unattend minus MSMQ (and IIS 7.0) and see what happens.
[/FONT]
 

My Computer

OS
Windows Embedded Standard 7
MSMQ probably requires IIS because it (as of v3.x) uses HTTP and SOAP messaging on both ends to do messaging, and these components come out of IIS binaries natively. I suppose they could re-write MSMQ to also have that functionality, but that doesn't make much sense.

If you do not have to configure MSMQ or IIS before sysprep'ing (hopefully you can do that unattended afterwards), that is always a better way to do imaging - less is more when it comes to sysprep, at least with inbox services like IIS.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Well, after removing MSMQ from FeaturePack-->Application Support and removing IIS 7.0 from FeaturePack-->Internet Information Services - IIS from my answer file in ICE, I installed the image on my target hardware. Immediately after installing, I ran "sysprep /audit /generalize /shutdown" per Creating a Build-to-Order (BTO) Windows Image at What Is Sysprep?
It looks like sysprep ran properly and no errors were reported in setuperr.log. I checked the Windows Setup State at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State and verified the state was set to IMAGE_STATE_SPECIALIZE_RESEAL_TO_AUDIT. So, what appears to be a bug has been worked around.

Cluberti, I have another question related to your statement, "...it would be better to use dism /onlinen to add it post-sysprep." In order to get MSMQ back (as well as IIS 7.0), my understanding is that I'll have to run "dism /online ..." after ...

  1. loading additional applications
  2. applying various group policies
  3. running "sysprep /oobe /generalize /shutdown" on the reference machine
  4. duplicate my CF as needed for mass deployment
  5. boot duplicated CF on target hardware
  6. run something like "dism /online /Add-Package /PackagePath:<package-path>" on each target before shipment. It seems this is the kind of thing the overall process was meant to avoid?!?!?
Does that sound about right?
 

My Computer

OS
Windows Embedded Standard 7
I never ever add applications to my base WIM, so I personally disagree with step 1 - however, there could be good reasons to lock an app into an image, so I won't knock it. I would just say that adding things into an image means you're going to have to recreate it if you need to go and update or change those apps in the future, meaning you have to redo your imaging entirely. I much prefer the MDT or SCCM way of doing things, where you put down an unchanged WIM with your unattend.xml desired changes, inject drivers during WinPE, reboot and then add apps, make settings changes, etc. However, like I said, there are always multiple ways to do imaging with Win7, and there could be a valid reason to do it another way - those ways can be quicker to plunk down an image, but with the tradeoff that they need ongoing maintenance attention.

As to step 2, technically you don't need to do this at all - any deviation from default settings (as would be configured in group policy) are removed and reset via sysprep, so whatever you do here is whacked anyway.

As to step 6, to add features via dism.exe like MSMQ or IIS to Windows Embedded, you should read this blog post on MSDN - basically you're creating an unattend file and config set with ICE, and then Apply-Unattend is run against it with dism later to apply it and install the packages you specified with ICE.


I believe you can install WE7 using MDT 2010, so it is something to look into. It might help you be more flexible and repeatable in your installs, as well as providing a lot of built-in logic for things like patches, drivers, hardware detection, etc., and avoid some of the things you're likely to run into doing it the "prescribed" ways on technet.
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
It looks like WES 7 SP1 CTP has addressed the problem. To test, I replaced MSMQ and resolved IIS 7 dependencies, rebuilt the image, and installed it on my reference machine. Eventually, when I get to the point where I need to run "[FONT=&quot]sysprep /oobe /generalize /shutdown /unattend:my-Sysprep-Unattend-File.xml", it runs to completion and shuts down the reference machine per the shutdown switch. After duplication, I brought the image up on my target hardware and verified ... [/FONT]
[FONT=&quot]HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State\ImageState = IMAGE_STATE_COMPLETE[/FONT]
[FONT=&quot]So, looks like its fixed.[/FONT]

[FONT=&quot][/FONT]
[FONT=&quot]See ...[/FONT]
[FONT=&quot]http://social.msdn.microsoft.com/Forums/en-US/quebecservicingdeployment/thread/8c71a9e8-3e9c-4880-84bc-fcae16f85bda?prof=required ... for details.[/FONT]

[FONT=&quot][/FONT]
[FONT=&quot]Thanks for your help.
[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]Kris[/FONT]
 

My Computer

OS
Windows Embedded Standard 7
Good to hear!
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Back
Top