Jump to content


anyweb

How can I pause a task sequence in System Center 2012 Configuration Manager ?

Recommended Posts

I love this forum, not sure why I haven't create an account before :)

I followed this and it worked excellent! then I modified because I didn't want a pause, I wanted a HTA to display and I get no error, get error code 0 and all looks good except that the HTA doesn't display!

 

SCCM 2012 R2 SP1 CU2 (no MDT other than the serviceUI.exe and my HTA file in a package that this thread explain, the VBS file works to pause)

 

running: ServiceUI.exe -process:tsprogressui.exe %SYSTEMROOT%\system32\mshta.exe TEST.HTA

 

and funny enough I had the pause from this thread running so I pressed F8 and read out smst.log and got this:

Content successfully downloaded at D:\_SMSTaskSequence\Packages\P0100382. InstallSoftware 3/2/2016 1:58:21 PM 1276 (0x04FC)
Resolved source to 'D:\_SMSTaskSequence\Packages\P0100382' InstallSoftware 3/2/2016 1:58:21 PM 1276 (0x04FC)
Command line for extension .exe is "%1" %* InstallSoftware 3/2/2016 1:58:21 PM 1276 (0x04FC)
Set command line: Run command line InstallSoftware 3/2/2016 1:58:21 PM 1276 (0x04FC)
Working dir 'D:\_SMSTaskSequence\Packages\P0100382' InstallSoftware 3/2/2016 1:58:21 PM 1276 (0x04FC)
Executing command line: Run command line InstallSoftware 3/2/2016 1:58:21 PM 1276 (0x04FC)
Process completed with exit code 0 InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
======================= InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Matched Processes InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
======================= InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Process Found: [TsProgressUI.exe] ID [1224] SESSION [1] InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
======================= InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Logon Lookup InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
======================= InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
[winlogon.exe] Session: [1] PID [432] [Target Session [1] = Match] InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
======================= InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Launch Process InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
======================= InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Program to launch : [X:\WINDOWS\system32\mshta.exe] InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Command line     : [X:\WINDOWS\system32\mshta.exe TEST.HTA] InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Process launching with PID [1320] InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Process exit code [0] InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
======================= InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)
Exiting with [0] InstallSoftware 3/2/2016 1:58:22 PM 1276 (0x04FC)

If I run only mshta.exe test.hta from cmd.exe after F8 the HTA comes up perfect.

But in the TS it just parse it, as successfully but never shows it.

 

Any idea what I could be doing wrong? excuse in advance if anything important is missing then I ahppily adjust and add info

thanks!

Share this post


Link to post
Share on other sites


is this running during the windows phase or in winpe ? if you open taskmgr.exe do you see mshta.exe running as a process ?

Share this post


Link to post
Share on other sites

is this running during the windows phase or in winpe ? if you open taskmgr.exe do you see mshta.exe running as a process ?

Thanks Anyweb,

 

Running it during WinPE, actually the first thing running in the whole TS, so F12, it PXE boot and bam!

I can F8 and run tasklist but I'm afraid the HTA is no longer running since my smsts.log says exit with code 0

The HTA I used I "took" from this site: https://t3chn1ck.wordpress.com/tag/hta/

Share this post


Link to post
Share on other sites

ran it again and in WinPe press F8 and then start taskmgr.exe it goes so quick but I could not see the HTA process flash by, but for PAsue vbs I see vbscript.exe (or what it is called)

Share this post


Link to post
Share on other sites

where is the file test.hta at this point ?

  • Like 1

Share this post


Link to post
Share on other sites

where is the file test.hta at this point ?

It is in the package so same folder as ServiceUI.exe

Replicated.

So I got this in same folder

  • ServiceUI.exe (64-bit)
  • test.hta
  • pause_ts.vbs

Running the ServiceUI.exe with pause_ts.vbs works great, running another with ServiceUI.exe calling test.hta gives success code but it goes in the same second and nothing displayed.

Added HTA support in 64-bit WinPE, if F8 and run the HTA file it goes as I want..

 

I maybe have to try to do misstake by misstake just to see if that also gives error code 0, or try to make the pause_ts.vbs call the HTA since I know that one works.. but sounds like a real "fullösning" :)

Share this post


Link to post
Share on other sites

the package ID is:P0100382 that includes the HTA, VBS and ServiceUI.exe

and I refind it here:

D:\_SMSTaskSequence\Packages\P0100382

 

so I assume it runs from that folder, or could that be the problem... I saw some put all in a .cmd file and use relative path (tilde)%dp0 etc..

Share this post


Link to post
Share on other sites

well based on this

 

Command line : [X:\WINDOWS\system32\mshta.exe TEST.HTA] InstallSoftware 3/2/2016 1:58:22 PM 1276

 

I think it's looking in x:\windows\system32 for the TEST.HTA file

  • Like 1

Share this post


Link to post
Share on other sites

well based on this

 

Command line : [X:\WINDOWS\system32\mshta.exe TEST.HTA] InstallSoftware 3/2/2016 1:58:22 PM 1276

 

I think it's looking in x:\windows\system32 for the TEST.HTA file

Thanks a lot, that would make sense that it doesn't work any maybe mshta.exe give exit code if ran but not finding a HTA file... I might test to hard code the path to run:

X:\WINDOWS\system32\mshta.exe D:\_SMSTaskSequence\Packages\P0100382\test.hta

just to see if it works.. if it does, then yeah spot on that was the issue.

I didn't had to do it for pause_ts.vbs so therefor thought it wasn't needed here either but it could be a dangerous assumption.

 

getting late here, will try it tomorrow and post back

 

thanks!

Share this post


Link to post
Share on other sites

wow! thank you so much, that was the issue, if I put X:\WINDOWS\system32\mshta.exe D:\_SMSTaskSequence\Packages\P0100382\test.hta my HTA shows up! of course I wont keep that path must use a varaible but 95% of the battle is done.

So I still don't understand why the VBS file doesn't need a path but the HTA needs but doesn't matter.

 

I love this forum it has helped me so much before by reading and now by these post, will try to hang around and try to give back something also and help others.

  • Like 1

Share this post


Link to post
Share on other sites

i'd recommend you copy the test.hta somewhere like %temp% and access it from there instead of from the package path

Share this post


Link to post
Share on other sites

Hi all,

 

I know this form is a few weeks old but I am having a heck of time trying to figure out why my pause in TS is not working. First off, I am trying to deploy my TS to existing imaged PCs in attempt to install several applications and to give my users a warning screen informing them that this installation is about to occur. I have tried the steps from anyweb in this earlier form but no avail. I keep receiving the below error message. I also added the Toolkit package pointing to MDT in case I am missing any files. And the Task Sequence package I have listed below consist of only the ServiceUI.exe and the .hta file.

 

Not sure what I'm overlooking but any help would be appreciated.

 

post-22069-0-86392400-1458920747.png

post-22069-0-40583600-1458920752.png

post-22069-0-89401900-1458920755.png

Share this post


Link to post
Share on other sites

So I am trying to repurpose this script to pause a TS that must be run from the user's desktop while logged in.  Everything works fine, I was able to change the text around to be informative to the user as needed and when they click OK or close the windows the TS progresses.  What I was trying to do was instead of an indefinite pause, to use the timer option of msgbox.  So basically I want the window to pop up and wait for whatever time I decided upon and then close and continue when the timer runs out.  Can you assist in this if possible?  I've researched some other TS pause options but this one works great and I just hoped to be able to modify it slightly for my use case.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...