Hide and show progress bar task sequence SCCM

Full article


Hide.vbs script

Set oTSProgressUI = CreateObject(“Microsoft.SMS.TSProgressUI”)
Set oTSProgressUI = Nothing

Show.vbs script


Public Function OpenProgressDialog

Dim oProgress
Dim uStep
Dim uMaxStep

‘ Try to create the progress UI object

On Error Resume Next
Set oProgress = CreateObject(“Microsoft.SMS.TSProgressUI”)
If Err then
Exit Function
End if
On Error Goto 0

‘ Update the progress

On Error Resume Next

uStep = CLng(oEnvironment.Item(“_SMSTSNextInstructionPointer”))
uMaxStep = CLng(oEnvironment.Item(“_SMSTSInstructionTableSize”))
Call oProgress.ShowTSProgress(oEnvironment.Item(“_SMSTSOrgName”), oEnvironment.Item(“_SMSTSPackageName”), oEnvironment.Item(“_SMSTSCustomProgressDialogMessage”), oEnvironment.Item(“_SMSTSCurrentActionName”), (uStep), (uMaxStep))

On Error Goto 0

‘ Dispose of the object

Set oProgress = Nothing

End Function


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s