egiroux
Posts: 169
Score: 4 Joined: 4/4/2006 From: Portland, Maine Status: offline
|
I've finally got things working the way I want. Here's how it's going: At the end of my Initialization phase I have a Gather action that processes rules in CustomSettings.ini. One of the steps in the INI queries a SQL database with the Serial# of the target computer. If not match is found (a match would pull a value for the OSDINSTALLPROGRAM variable) then my HTA front-end is displayed. The state of the OSDINSTALLPROGRAM variable gets checked from and the HTA gets called from a UserExit script. Here's the line of code from my UserExit that was giving me problems with having the HTA launch properly at first: iRetVal = wshShell.Run("cmd.exe /c start ""MYHTA1"" ""%DEPLOYROOT%\Scripts\Frontend.hta""", 1, true) Once I got the HTA to actually launch it took a little effort to get all the functionality that previously worked with SMS 2003 OSD to work with ConfigMgr. The biggest thing was changing everything from using the OSD Environment object to the Microsoft.SMS.TSEnvironment object. Aside from that I had a couple snags with some external calls the hta makes to a separate script. This just had to do with working directories. I have my hta in the Scripts folder of my MDT Toolkit package. My UserExit is in my MDT Settings package so I had trouble just referencing the script names. I had to use the full path to %DeployRoot%\Scripts\...... to get all the calls to work. With that working I started playing around with the AutoIT script to move the TS window. This was pretty easy to make work. I downloaded AutoIt and after a couple tests I got my HTA to execute the AutoIT script to move the TS window. My HTA is at the top left and it moves the TS window down and over to the right so the HTA is fully visible. Pretty handy. I also have a 2nd HTA that launches in the Preinstall phase and the StateRestore phase. This one is informational for the tech and just displays a few of the key deployment variables providing notification of which type of build is coming down, log share, target user, new computer name, etc. Today's task is to figure out a quick and easy way to re-imge machines once they're in the SMS database. Anyone got a script that will move a particular resource to the collection where my task sequence is advertised?
|