SCCM Setup Windows and ConfigMgr action (Full Version)

All Forums >> [Management Products] >> Operating System Deployment



Message


permster -> SCCM Setup Windows and ConfigMgr action (6/11/2008 2:16:50 PM)

Anyone else noticed that the "Setup Windows and ConfigMgr" action resolves environment variables in the sysprep.inf before it restarts into sysprep?  We have a HAL detect script that writes %windir%\system32\hal.dll into the sysprep.inf.  However, once that action runs it resolves them as E:\Windows because the destination drive is generally mounted as E: in WinPE under SCCM.

Curious if anyone else has seen this?  We have had to hard code it to write C:\Windows instead of the environment variables to get around this issue.




brpo -> RE: SCCM Setup Windows and ConfigMgr action (7/6/2008 3:08:44 PM)

Hi
This behaviour is normal, since all variables are replaced.
You could be able to define your own variable for this drive in the TS and reuse it in your custom sysprep.inf
You would do this in the 'Format and Partition disk', Partition properties, Advanced settings - Variable.
The variable you define here could then be used within your sysprep.
Hope it helps




permster -> RE: SCCM Setup Windows and ConfigMgr action (7/7/2008 10:42:24 AM)

Why would that be normal?  Why would it resolve environment variables written in the sysprep.inf while still in WinPE?  When it does that you end up with E:\Windows hard coded inside your sysprep.inf.  Then when it reboots into the sysprep mini-setup the E:\Windows path doesn't exist.  I think this is a side effect or issue in the "Setup Windows and ConfigMgr" action.  I can't think of any reason why it would need to resolve those variables during WinPE.  Sysprep mini-setup can resolve the variables by itself as it always has.




brpo -> RE: SCCM Setup Windows and ConfigMgr action (7/7/2008 2:28:31 PM)

Hi
the fact is that any variables you define (in sysprep, at collection or computer level or programmatically) are resolved before sysprep is used so that they can be replaced in the file. In your case, of course, this is not what you would like to do, as the variable should be read as is when sysprep runs. However, if you define other variables like %domain% for instance, it is required that those variables be resolved before being written in the sysprep.inf as sysprep does not take care of those external variables that exist in the TS, it just reads the inf file. It should be very easy to workaround the problem by using the variable of the os drive. This way, if you have different partitions, the correct one will always be used and the sysprep file won't have to be edited in case you don't use the C: drive for os install. 




permster -> RE: SCCM Setup Windows and ConfigMgr action (7/7/2008 2:55:43 PM)

I see your point.  I just wish the TS action only resolved environment variables for values that it writes and not throughout the entire sysprep.inf file.  I have environment varables in a few different locations in my sysprep.inf file that the TS doesn't modify, but it resolves all the environment variables regardless.  Really annoying.

For those that don't understand the problem.  A good example of this problem is right here on this site.  Take a look at the scripts in this article:  http://www.myitforum.com/articles/15/view.asp?id=8997.  If you use those scripts out of box (with SCCM) they write %WINDIR% into your sysprep.inf.  Which later in WinPE gets resolved to E:\Windows for example and causes sysprep mini-setup to die when doing the HAL detect because during sysprep mini-setup there is no E:\Windows.

Brpo, I don't follow you on your workaround.  Setting a TS variable (for the system drive) in WinPE is worthless because your system drive isn't C: in WinPE.  It re-assigns your system drive.  Exactly how would that work?

I don't see a great way to accomplish what I want without hard coding the C drive into sysprep.inf.  If you don't have a need to install the image on a different partition I guess that's OK for most.  I guess I'll let this one rest.  Apparently no one uses environment variables in their sysprep.inf with SCCM.  Or maybe not enough people use SCCM yet.




brpo -> RE: SCCM Setup Windows and ConfigMgr action (7/8/2008 4:33:48 PM)

Oups, wrong answer indeed. sorry for that.
Here is another post that talks about this. Check "Question for HAL Swapping & "ZTIHaldetect.vbs" script" in SCCM forum
One alternative that i will try tomorrow would be to have the haldetect script run after or integrated within the script that writes the sysprep.inf
and before the reboot.




permster -> RE: SCCM Setup Windows and ConfigMgr action (7/8/2008 4:53:21 PM)

Yeah that's the same issue in that thread.  I know the part about using the OSDTargetSystemDrive TS variable to find the sysprep.inf, but it looks like the person in that thread ended up hard-coding C:\Windows instead of %WINDIR%.  That's the conclusion I came to as well.  The part that resolves the environment variables in sysprep.inf is the "Setup Windows and ConfigMgr" action.  From what I've looked at it isn't possible to modify what that does.  It handles the sysprep.inf and the restart into sysprep.  It doesn't seem possible to inject anything in between. [:(]




brpo -> RE: SCCM Setup Windows and ConfigMgr action (7/9/2008 4:45:32 AM)

Hi
in fact the sysprep is changed by the zticonfigure.wsf script.
If you really want to use the haldetect without setting it to a fixed path,
then you would have to reproduce the behaviour of ztihaldetect.vbs and insert it at the end of zticonfigure.wsf. Note that I don't recommend changing those files, as it's not supported by Ms. (well you will tell me that swapping hals is not supported either...  !?).
Brgds






Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.203125