Jump to content


Sign in to follow this  
Jerrycho

Tasksequence .hta end message for windows 2012 R2 Server

Recommended Posts

Hello,

I'm using a HTA end script that working well with Windows 2008 R2 SP1. Same script under Windows 2012 R2 does not show the end message but runs through and closes the tasksequence successful.

 

Both tasksequences starts the hta this way

post-30876-0-13166200-1439541125_thumb.jpg

 

Tryed also with following command lines, with and without "Disable 64-bit file system redirection"

ServiceUI.exe -process:TSProgressUI.exe %SYSTEMROOT%\system32\mshta.exe OS_Successful_Message.hta

%SYSTEMROOT%\system32\mshta.exe OS_Successful_Message.hta

 

Here's the script

<html>
<head>
<title>My HTML application</title>
<HTA:APPLICATION
	APPLICATIONNAME="OSD Complete" 
	SCROLL="yes" 
	SINGLEINSTANCE="yes" 
	CAPTION="no"
	WINDOWSTATE="maximize">
</head>

<script language="VBScript">

Sub Window_OnLoad
	'Hide TaskSequence Window
	Set oTSProgressUI = CreateObject("Microsoft.SMS.TSProgressUI") 
	oTSProgressUI.CloseProgressDialog()
	Set oTSProgressUI = Nothing
End Sub


</script>
</head>
<body style="border: 1px solid #D0D0D0; font-size: 12px; font-family: 'Segoe UI',Tahoma,verdana,arial; color: #606060; background-color:#E0E0E0" onload="Window_OnLoad">
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
	<tr>
		<td>
			<div align="left"><img style="width: 164px; height: 35px; border: 0;" src="swissgrid_164x35.png" alt="swissgrid_logo"></div>
		</td>
	</tr>
	<tr>
		<td>
			<h1><div align="center" style="color: #000000"><b>Server Staging Infrastructure</b></h1>
		</td>
	</tr>
	<tr>
		<td>
			 
		</td>
	</tr>
	<tr>
		<td>
			<h1><div align="center" style="color: #000000"><b>Installation was successful</b></h1>
		</td>
	</tr>
	<tr>
		<td>
			 
		</td>
	</tr>
	<tr>
		<td>
			 
		</td>
	</tr>
	<tr align="center">
		<td>
            <b>Click OK to logon</b>
        </td>
    </tr>
	<tr align="center">
		<td>
        	<div align="center"><input type="button" value="OK" onclick="self.close()" style="position:center; font-weight:bold; font-size:15px; height:30px; width:80px"></div>
		</td>
	</tr>
</table>
</body>
</html>

Does anybody know, why the same hta script works on Windows 2008 R2 SP1 and not on Windows 2012 R2?

 

Regards

Jerry

 

 

Share this post


Link to post
Share on other sites


what does the smsts.log file tell you about the step in question ?

Share this post


Link to post
Share on other sites

Hi,

 

Status Message says.

The task sequence execution engine successfully completed the action (Run OS_Successful_Message) in the group (End Message) with exit code 0
Action output: [ smsswd.exe ]
PackageID = 'LAB000A6'
BaseVar = '', ContinueOnError=''
ProgramName = 'OS_Successful_Message.hta'
SwdAction = '0001'
ResolveSource flags: 0x00000000
SMSTSPersistContent: . The content for package LAB000A6 will be persisted
The package LAB000A6 is found locally in the cache C:\_SMSTaskSequence\Packages\LAB000A6
Resolved source to 'C:\_SMSTaskSequence\Packages\LAB000A6'
Command line for extension .hta is C:\Windows\SysWOW64\mshta.exe "%1" {1E460BD7-F1C3-4B2E-88BF-4E770A288AF5}%U{1E460BD7-F1C3-4B2E-88BF-4E770A288AF5} %*
Set command line: Run command line
Working dir 'C:\_SMSTaskSequence\Packages\LAB000A6'
Executing command line: Run command line
Process completed with exit code 0
Command line returned 0
ReleaseSource() for C:\_SMSTaskSequence\Packages\LAB000A6.
reference count 1 for the source C:\_SMSTaskSequence\Packages\LAB000A6 before releasing
Released the resolved source C:\_SMSTaskSequence\Packages\LAB000A6.

and in SMSTS.log

Expand a string: WinPEandFullOS	TSManager	14.08.2015 16:51:50	1848 (0x0738)
Executing command line: smsswd.exe /run:LAB000A6 OS_Successful_Message.hta	TSManager	14.08.2015 16:51:50	1848 (0x0738)
[ smsswd.exe ]	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
PackageID = 'LAB000A6'	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
BaseVar = '', ContinueOnError=''	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
ProgramName = 'OS_Successful_Message.hta'	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
SwdAction = '0001'	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
ResolveSource flags: 0x00000000	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
SMSTSPersistContent: . The content for package LAB000A6 will be persisted	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
The package LAB000A6 is found locally in the cache C:\_SMSTaskSequence\Packages\LAB000A6	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
Resolved source to 'C:\_SMSTaskSequence\Packages\LAB000A6'	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
Command line for extension .hta is C:\Windows\SysWOW64\mshta.exe "%1" {1E460BD7-F1C3-4B2E-88BF-4E770A288AF5}%U{1E460BD7-F1C3-4B2E-88BF-4E770A288AF5} %*	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
Set command line: Run command line	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
Working dir 'C:\_SMSTaskSequence\Packages\LAB000A6'	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
Executing command line: Run command line	InstallSoftware	14.08.2015 16:51:50	3020 (0x0BCC)
Process completed with exit code 0	InstallSoftware	14.08.2015 16:51:51	3020 (0x0BCC)
Command line returned 0	InstallSoftware	14.08.2015 16:51:51	3020 (0x0BCC)
ReleaseSource() for C:\_SMSTaskSequence\Packages\LAB000A6.	InstallSoftware	14.08.2015 16:51:51	3020 (0x0BCC)
reference count 1 for the source C:\_SMSTaskSequence\Packages\LAB000A6 before releasing	InstallSoftware	14.08.2015 16:51:51	3020 (0x0BCC)
Released the resolved source C:\_SMSTaskSequence\Packages\LAB000A6	InstallSoftware	14.08.2015 16:51:51	3020 (0x0BCC)
Process completed with exit code 0	TSManager	14.08.2015 16:51:51	1848 (0x0738)

Share this post


Link to post
Share on other sites

well it looks like it is running the step fine and probably displaying the info to SYSTEM which is why you can't see it, have you tried opening the taskmgr and checking if MSHTA.exe is actually running at that point,

 

i know you tried serviceUI.exe which is the suggested workaround, however, do you have the logs of that step also ?

Share this post


Link to post
Share on other sites

Hi,

 

Following content if TS runs this command "ServiceUI.exe -process:tsprogressui.exe %WINDIR%\SYSWOW64\mshta.exe OS_Successful_Message.hta"

 

Message Viewer:

The task sequence execution engine successfully completed the action (Run OS_Successful_Message 2) in the group (End Message) with exit code 0
Action output: ...  command line: Run command line
Working dir 'C:\_SMSTaskSequence\Packages\LAB00142'
Executing command line: Run command line
Process completed with exit code 0

 =======================
 Matched Processes
 =======================
 Process Found: [TsProgressUI.exe] ID [2084] SESSION [1]

 =======================
 Logon Lookup
 =======================
 [winlogon.exe] Session: [1] PID [392] [Target Session [1] = Match]

 =======================
 Launch Process
 =======================Program to launch : [C:\WINDOWS\SYSWOW64\mshta.exe]
 Command line      : [C:\WINDOWS\SYSWOW64\mshta.exe OS_Successful_Message.hta]

 Process launching with PID [2520]
 Process exit code [0]

 =======================
 Exiting with [0]
 =======================
Command line returned 0
ReleaseSource() for C:\_SMSTaskSequence\Packages\LAB00142.
reference count 1 for the source C:\_SMSTaskSequence\Packages\LAB00142 before releasing
Released the resolved source C:\_SMSTaskSequence\Packages\LAB00142.

There is no "mshta.exe" process in TaskManager after the "Run OS_Successful_Message" job.

 

And from stsms.log

<![LOG[VerifyContentHash: Hash algorithm is 32780]LOG]!><time="11:16:37.003-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="downloadcontent.cpp:1899">
<![LOG[c:\_smstasksequence\packages\lab00142\osdresults is a directory. Setting directory security]LOG]!><time="11:16:37.034-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="hashdir.cpp:377">
<![LOG[c:\_smstasksequence\packages\lab00142\scripts is a directory. Setting directory security]LOG]!><time="11:16:37.034-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="hashdir.cpp:377">
<![LOG[c:\_smstasksequence\packages\lab00142\osdresults\images is a directory. Setting directory security]LOG]!><time="11:16:37.081-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="hashdir.cpp:377">
<![LOG[Content successfully downloaded at C:\_SMSTaskSequence\Packages\LAB00142.]LOG]!><time="11:16:37.206-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="resolvesource.cpp:3583">
<![LOG[Resolved source to 'C:\_SMSTaskSequence\Packages\LAB00142']LOG]!><time="11:16:37.206-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:453">
<![LOG[Command line for extension .exe is "%1" %*]LOG]!><time="11:16:37.206-120" date="08-19-2015" component="InstallSoftware" context="" type="0" thread="1704" file="commandline.cpp:229">
<![LOG[Set command line: Run command line]LOG]!><time="11:16:37.206-120" date="08-19-2015" component="InstallSoftware" context="" type="0" thread="1704" file="commandline.cpp:732">
<![LOG[Working dir 'C:\_SMSTaskSequence\Packages\LAB00142']LOG]!><time="11:16:37.206-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:546">
<![LOG[Executing command line: Run command line]LOG]!><time="11:16:37.206-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="commandline.cpp:828">
<![LOG[Process completed with exit code 0]LOG]!><time="11:16:39.143-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="commandline.cpp:1124">
<![LOG[]LOG]!><time="11:16:39.143-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Matched Processes]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Process Found: [TsProgressUI.exe] ID [2084] SESSION [1]]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Logon Lookup]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ [winlogon.exe] Session: [1] PID [392] [Target Session [1] = Match]]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Launch Process]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Program to launch : [C:\WINDOWS\SYSWOW64\mshta.exe]]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Command line      : [C:\WINDOWS\SYSWOW64\mshta.exe OS_Successful_Message.hta]]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Process launching with PID [2520]]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Process exit code [0]]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ Exiting with [0]]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[ =======================]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:34">
<![LOG[Command line returned 0]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="runcommandline.cpp:569">
<![LOG[ReleaseSource() for C:\_SMSTaskSequence\Packages\LAB00142.]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="resolvesource.cpp:3873">
<![LOG[reference count 1 for the source C:\_SMSTaskSequence\Packages\LAB00142 before releasing]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="resolvesource.cpp:3883">
<![LOG[Released the resolved source C:\_SMSTaskSequence\Packages\LAB00142]LOG]!><time="11:16:39.159-120" date="08-19-2015" component="InstallSoftware" context="" type="1" thread="1704" file="resolvesource.cpp:3921">
<![LOG[Process completed with exit code 0]LOG]!><time="11:16:39.190-120" date="08-19-2015" component="TSManager" context="" type="1" thread="1912" file="commandline.cpp:1124">
<![LOG[!--------------------------------------------------------------------------------------------!]LOG]!><time="11:16:39.190-120" date="08-19-2015" component="TSManager" context="" type="1" thread="1912" file="instruction.cxx:805">
<![LOG[Successfully completed the action (Run OS_Successful_Message 2) with the exit win32 code 0]LOG]!><time="11:16:39.190-120" date="08-19-2015" component="TSManager" context="" type="1" thread="1912" file="instruction.cxx:846">

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...
Sign in to follow this  

×
×
  • Create New...