January 24 2013

Popup message during SCCM task sequence in full OS

So it’s pretty easy to create a VB script popup during a task sequence when it is running in WinPE, however it’s a bit more difficult to have a VB script popup to show to the user when the task sequence is still running in the full OS – eg Windows 7 with a user logged on.


This is one method that I used to get it working, maybe there are easier or cleaner ways, but this one works well for me. We can achieve something like this:



In the task sequence, somewhere after the MDT Use Toolkit Package step, add a command line step:

TS Warning


Use the following command line:

“%ScriptRoot%ServiceUI.exe” -process:tsprogressui.exe %SYSTEMROOT%system32wscript.exe “%ScriptRoot%Warning.wsf”


This is the warning VB script (Warning.wsf) that I’ve used in my example, you just need to put this in your MDT scripts folder:


<job id=”setEnv”>

<script language=”VBScript” src=”ZTIUtility.vbs”/>
<script language=”VBScript”>

Dim oTSProgressUI
set oTSProgressUI = CreateObject(“Microsoft.SMS.TSProgressUI”)

MsgBox “Popup warning message to go here. This is shown in the user session.” & chr(13) & chr(13) & “Press OK to continue.”,0, “Warning”




There is also a bit of info over here on ServiceUI.exe – http://blogs.technet.com/b/cameronk/archive/2011/01/25/can-i-use-serviceui-exe-to-launch-other-programs-besides-the-udi-setup-wizard.aspx



I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.


December 27 2011

DameWare remote control in WinPE

I’ve previously blogged about using TightVNC in WinPE. This time I have successfully intergrated DameWare Remote Control 7.5 into WinPE 3.1.

In my case I was using an x86 version of Windows PE 3.1. I am using UNATTEND.XML to install the DameWare process. We cannot use tsconfig.ini because it is called too late in the process and I want the DaweWare executable to run immediately upon network connectivity. WinPEShl.ini cannot be used as SCCM overwrites this file everytime you update the boot image / DP. Startnet.cmd cannot be used as this is not called if WinPEShl.ini exists.

Mount your BOOT.WIM file using something like DISM.exe, in this example I am mounting it to c:MOUNT.

Download DameWare from the website and install to your workstation. Navigate to “%programfiles%DameWare DevelopmentDameWare Mini Remote Control 7.5” and copy *.exe and *.dll to c:mountwindowssystem32, except for DWRCC.exe & DWRCSMSI.exe (if you don’t copy all of these files, later on you will get a prompt to update /repair client).

Create a batch file called DAMEWARE.BAT and copy it to c:mountwindowssystem32. Add the following commands to the DAMEWARE.BAT and then save:

“%SYSTEMROOT%System32DWRCS.exe” -install
net user administrator password

The above commands install the DameWare process and then creates a WinPE administrator account with the password that you have specificed.

Create a file called UNATTEND.XML and copy it to c:mount. Add the following content to the file and then save:

Now unmount your WIM file, making sure you commit. Add it to SCCM or WDS or whatever you are using for deployment services. Once you boot from this you will now be able to connect to the machine via DameWare! Use the password you have specified in the batch file above. I recommend using this in conjunction something like BGInfo so that the IP address is shown on the background.

Related links:


October 19 2011

How to set date format and timezone in WinPE

I had a need for an accurate timezone and specific date format during Windows PE session when using SCCM OSD.

To change timezone:

At the start of the task sequence, run a command like “reg.exe import AUS_EST.reg”
This is simply an export of HKLMSystemCurrentControlSetControlTimeZoneInformation.
In my case, the contents of AUS_EST.reg looked like:

Windows Registry Editor Version 5.00

“StandardName”=”AUS Eastern Standard Time”
“DaylightName”=”AUS Eastern Daylight Time”

To change date format in WinPE:

Mount WIM using DISM
Load hive “mount”WindowsSystem32configDEFAULT into registry
Navigate to the loaded hive then Control PanelInternational
Update the values you need to in here such as sLongDate and sShortDate
Unload hive
Unmount WIM using DISM, ensuring that you use the /commit switch

For more info on editing the registry for a WIM file, see my other post http://blog.danovich.com.au/2010/03/16/edit-the-registry-inside-a-wim-file/

September 6 2011

Remote control in WinPE

Fresh from my recent trip to TechEd, I learnt about a way to remotely connect to a WinPE session using a new Microsoft tool called Dart. For more info on this tool, see here – http://www.deploymentresearch.com/Blog/tabid/62/EntryId/36/Software-Assurance-Pays-Off-Remote-Connection-to-WinPE-during-MDT-SCCM-deployments.aspx .

This prompted me to think what organisations without Microsoft software assurance (MDOP) can use for remote connection to WinPE. I successfully configured and used TightVNC version 2.0.2 with WinPE 3.0 (x86) in my environment. Take a look here and here for more hints on how to do this. I used the same method to get BGInfo to run at WinPE startup.