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:


  


HTA / Scripts hang during task sequence

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

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> HTA / Scripts hang during task sequence Page: [1]
Login
Message << Older Topic   Newer Topic >>
HTA / Scripts hang during task sequence - 8/26/2008 10:28:43 AM   
xneilpetersonx

 

Posts: 152
Score: 1
Joined: 7/18/2006
Status: offline
I want to run a script or HTA in my task sequence that will set the OSDComputername variable. I believe I have the script all worked out however when I add the command lint to the task sequence the TS just hangs up at this step. For instance if the task name is “Set Computer Name”, I end up with Running action – “Set Computer Name” which fails to progress. I at first thought I was just specifying the incorrect script location - %deployroot%\scripts\scriptname.hta however when that did not work set an explicit path to where the script could be found and came up with the same results.
I guess I have three questions
  • Where at in my MDT TS should I be placing this script – I have it as the first task under New Computer Only.
  •  Second – what are the steps to add a command line that will run a script? I have added the command line task, and then entered the command line – \\servername\script\compname.hta. Am I missing somethign simple.
  •  Third –If I need to investigate into log files which files should I be looking at?
Thanks for any advice.

neilp

< Message edited by xneilpetersonx -- 8/26/2008 10:29:28 AM >
Post #: 1
RE: HTA / Scripts hang during task sequence - 8/27/2008 6:02:15 AM   
jquirk822


Posts: 189
Score: 12
Joined: 2/20/2003
Status: offline
Hi Neil,
1. You have the script in a valid place.
2. This command line looks wrong. Unless you're doing something to make that location available (using a connect to network location task prior to running this command). Assuming you're using an imported MDT Task Sequence (and why wouldn't you..?) copy your HTA to the scripts folder, then call %scriptroot%\YourHTA.HTA. Easy as that.
3. In the SMSTS.LOG. This'll be in the rrot of C:\_SMSTS.... or in C:\WindowsTemp or X:\Windows\Temp or C:\WIndows\System32\CCM\Logs\SMSTS depending on the scenario.

As an aside, you may find that the SMSTS.LOG file is locked open in PE. You an make of copy of it (copy smsts.log john.log) or if you include Trace32.exe in your PE media (and I always do this...) it can access the open file where notepad cannot.

Hope this helps

John

(in reply to xneilpetersonx)
Post #: 2
RE: HTA / Scripts hang during task sequence - 8/27/2008 9:18:53 AM   
hcortez463


Posts: 769
Score: 62
Joined: 4/8/2005
Status: offline
see if these links help out

http://kongkuba1.spaces.live.com/blog/cns!EEFF1607E296E5AB!225.entry

http://forums.windowsitpro.com/web/forum/messageview.aspx?catid=43&threadid=45448&enterthread=y

http://www.deployvista.com/Repository/BDD2007/tabid/74/Default.aspx

_____________________________

If it Helps, Please rate....

(in reply to jquirk822)
Post #: 3
RE: HTA / Scripts hang during task sequence - 8/28/2008 3:37:25 PM   
egiroux

 

Posts: 169
Score: 4
Joined: 4/4/2006
From: Portland, Maine
Status: offline
try launching it from your TS like this:

cmd.exe /c start "MYHTA" "%SCRIPTROOT%\MyHTA.hta"

You could use the /wait to have the TS pause until the HTA is finished.  You could also call the hta from a vbs file, like a UserExit by referencing it like this:

iRetVal = wshShell.Run("cmd.exe /c start ""MYHTA1"" ""%DEPLOYROOT%\Scripts\MYHTA.hta""", 1, true)

This example assumes the hta is in the MDT Toolkit package source under scripts.  The , true will cause the TS to pause until the hta is finished executing.

(in reply to hcortez463)
Post #: 4
RE: HTA / Scripts hang during task sequence - 8/29/2008 11:11:35 AM   
xneilpetersonx

 

Posts: 152
Score: 1
Joined: 7/18/2006
Status: offline
Thanks for all of the tips. I hope to get some time in my lab this weekend and will follow up then.

Thanks again

neilp

(in reply to egiroux)
Post #: 5
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> HTA / Scripts hang during task sequence 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.250