Task Sequence Variable - Prompt for Wim Image Name Capture Only
I have a capture only task sequence that works beautifully, and is very simple, but there is one thing I would like to change. Here are the components of my SCCM capture-only TS: 1. Use Toolkit Package (MDT Integration) 2. Set Backup Location (TS variable: ComputerBackupLocation ) 3. Set Backup Filename (TS variable: BackupFile ) 4. Create Image (MDT create image script: cscript "%scriptroot%\ZTIBackup.wsf" ) I don't think it matters, but this is capturing an XP image. I would like to eliminate #3 and prompt for an image name (not a computer name, the .wim name) How can this be done? Via another TS variable perhaps (I'm reading through the MS documentation on that right now, but so far, nothing pops out that looks like it will prompt for the .wim name during the OSD) Thanks!
April 27th, 2011 10:35am

Run this script instead of step 3 (it's a vbs script). It will set the BackupFile variable to weatherer you type in the inputbox. ----------start script ------------- set env = CreateObject("Microsoft.SMS.TSEnvironment") Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI") ProgressUI.CloseProgressDialog BackupFile = InputBox("Name of wim file") env("BackupFile") = BackupFile ----------end script ------------- I would like to mention, that the beauty of adding images to the same WIM, is the fact that it will reuse files already in the wim. this means you could have 10 XP images in the same WIM, and the size of the wim will only grow with the changes you make. I kind of explain this a little bit here http://blog.coretech.dk/mip/capture-none-syspreped-image-using-sccm-running-imagex-from-a-ts/ Michael Petersen http://blog.coretech.dk/mip/
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 3:11am

That is an excellent solution, thank you! One question, for a few of my test captures (I haven't implemented your solution yet) I simply omitted the backupfile variable, i.e., I left the value blank; the capture ts worked fine, and actually named the wim images automatically to the system serial number, this was actually ideal. Now, for some strange reason probably caused by my tinkering, even when I omit the value from the backupfilename, the wim is named 'minint-qret432.wim' or some other randomly generated name. What may have changed? I will try your solution, but I actually see some benefit to the capture TS auto-naming the wim to the serial number, may come in handy for quick backups of individual systems. I read somewhere (can't find the post of course) that this is by design, i.e. when you omit the backup file name in a capture ts, some component of the MDT tools does a WMI command to obtain the system bios serial number and uses that for the .wim name, can anyone confirm that, and where that may be referenced in the MS docs? Thanks again Michael!
May 2nd, 2011 11:23am

Michael, I noticed on other MDT integrated task sequences I've created, whenever it needs to run a script, it uses: "cscript.exe "%deployroot%\scripts\ztiprereq.vbs"" so it is pointing to %deployroot% instead of %scriptroot%. Where is %scriptroot% and %deployroot% actually pointing to on the sccm server? can you change the values of those variables or are they hard-coded?
Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2011 12:27pm

to answer your first question, the backup script will set the backupfile name to the computername, if left blank. I'm pretty sure you must have been setting OSDcomputrname equal serial or asettag in your cs.ini or something like that, but i can really remember if there is some cases where this is done automatically!! But if you want to go back to using serial, just define a TS variable OSDComputerName=%SerialNumber% or %AssetTag% %deployroot% always point to the local path of your toolkit package.. When you use a "Use Toolkit" step, the content of your toolkit package Will be downloaded to the disk. That means that when ruining a script from %deployroot% if will run local rather than from the network. %DeployRoot% points to the root of the toolkit %ScriptRoot% points to the scripts folder %ToolRoot% points to the Tools folder These variables are set every time you run the toolkit step, as the path may wary depending on where you are in the process (in pe it could med D:, if you have a Bitlocker partition, an C: in full OS) This also enables you to run your own stuff from a folder you create in the toolkit, like if you create a personal folder the syntax would be: cscript.exe %DeployRoot%\personal\yourscript.vbs Be aware though, that the entire toolkit is downloaded, so be aware what you put in it!Michael Petersen http://blog.coretech.dk/mip/
May 2nd, 2011 3:04pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics