My OSD adventure Part 1
I’m working on getting OSD running at the Commonwealth Of Pennsylvania. We presently have it running but we are only able to use a CD to deploy.
So I have spent the last 3 weeks off/on working and learning OSD. I want to make it so that any agency can follow the directions that I put together so they can get up and running. I also want to understand how things work so when I get called for support I can assist.
During this testing I will be working toward a goal of having 1 or 2 images that will install on any workstation (none server). In an attempt to reach this goal I started playing with this script: http://www.myitforum.com/articles/15/view.asp?id=8997
Johan A. did a great job putting this Hal recognition script together. I will be using the VTI_HallDetect.vbs script in this test, But I found that I needed more logging since I couldn’t get the script to run.
I added a new log file that is created in the OSDLogs folder. I also added code that will add debug/ error code to the default OSD logs.
This was very helpful when I started troubleshooting why the ZTI_HALDETECT script didn’t seem to be doing anything.
So I started using a Debug script that I found. Once again this was a script that needed to be tweaked. Anyway this script puts a Archive_OSD.SMS file in the MiniNT folder. I also created a second script to add the file OSD.Debug file to the c drive.
This will allow OSD to keep the logs on the c drive so that you can trouble shot your push if needed. It will also add more debugging entries into the logs. I noted what type of OSD tasks they need to be.
' Note: this doc contains both scripts.
' You will need to copy each one into a different VBScript and setup the task type at the top of each script.
' These scripts will not run in your Desktop OS enviorenment. They are ment to run in OSD PE enviorenment. '*********************
' preinstall task
'*********************
Option ExplicitDim targetPath, env, file2, fso
set env = CreateObject("OSD.Environment")targetPath = env("OSDTARGETDRIVE")
Set fso = CreateObject("Scripting.FileSystemObject")
set file2 = fso.CreateTextFile(targetPath & "osd.debug",TRUE)
file2.CloseSet fso = Nothing
'**********************
'Post Install Task
'**********************
Option Explicit
Dim targetPath, env, file1, fso
set env = CreateObject("OSD.Environment")
targetPath = env("OSDTARGETDRIVE")
Set fso = CreateObject("Scripting.FileSystemObject")
set file1 = fso.CreateTextFile(targetPath & "MININT\archive_osd.sms",TRUE)
file1.Close
Ok so now I have debugging working but I still couldn’t figure out why the Zti_Haldetect script wasn’t running. So I followed theses directions to get a command prompt in OSD PE http://www.myitforum.com/articles/8/view.asp?id=10052
This worked great because now I could run the script manually and actually see if there was a problem.
Turns out there was a problem. The script was written assuming that the C: drive was the working directory. Unfortunately in my OSD environment OSD uses the X: drive when it is deploying the Image and after a reboot it gets changed to the C: drive. So basically the script was not executing because it couldn’t find the C: drive.
To fix this problem I made another change to the ZTI_HalDetect script. Now the script will check to see what the SystemDrive variable is before it makes its needed changed. Thus saving its changes on the correct drive. The nice thing about this change is that the Script doesn’t care what drive OSD uses it just finds it and makes the changes.
Ok well that is all I have on the topic for now. I will have a part 2 coming in a few days ( I hope)
I attached copies of the scripts for all.