myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


SCCM Setup Windows and ConfigMgr action

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> Operating System Deployment >> SCCM Setup Windows and ConfigMgr action Page: [1]
Login
Message << Older Topic   Newer Topic >>
SCCM Setup Windows and ConfigMgr action - 6/11/2008 2:16:50 PM   
permster

 

Posts: 14
Score: 0
Joined: 11/22/2006
Status: offline
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.
Post #: 1
RE: SCCM Setup Windows and ConfigMgr action - 7/6/2008 3:08:44 PM   
brpo

 

Posts: 22
Score: 0
Joined: 8/11/2006
Status: offline
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

(in reply to permster)
Post #: 2
RE: SCCM Setup Windows and ConfigMgr action - 7/7/2008 10:42:24 AM   
permster

 

Posts: 14
Score: 0
Joined: 11/22/2006
Status: offline
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.

(in reply to permster)
Post #: 3
RE: SCCM Setup Windows and ConfigMgr action - 7/7/2008 2:28:31 PM   
brpo

 

Posts: 22
Score: 0
Joined: 8/11/2006
Status: offline
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. 

(in reply to permster)
Post #: 4
RE: SCCM Setup Windows and ConfigMgr action - 7/7/2008 2:55:43 PM   
permster

 

Posts: 14
Score: 0
Joined: 11/22/2006
Status: offline
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.

(in reply to permster)
Post #: 5
RE: SCCM Setup Windows and ConfigMgr action - 7/8/2008 4:33:48 PM   
brpo

 

Posts: 22
Score: 0
Joined: 8/11/2006
Status: offline
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.

(in reply to permster)
Post #: 6
RE: SCCM Setup Windows and ConfigMgr action - 7/8/2008 4:53:21 PM   
permster

 

Posts: 14
Score: 0
Joined: 11/22/2006
Status: offline
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.

(in reply to brpo)
Post #: 7
RE: SCCM Setup Windows and ConfigMgr action - 7/9/2008 4:45:32 AM   
brpo

 

Posts: 22
Score: 0
Joined: 8/11/2006
Status: offline
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



(in reply to permster)
Post #: 8
Page:   [1]
All Forums >> [Management Products] >> Operating System Deployment >> SCCM Setup Windows and ConfigMgr action Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.344