ALLOW USER TO POSTPONE SCCM SOFTWARE DEPLOYMENT

In some situation you may want to allow some users to postpone an software installation, ex; if the application need to close some processes and you want to deploy it while users are logged on.

So here’s a simple way to do it, but note that if you must deploy the program with the administrative rights you will also need to allow the users to interact with this program… therefore you can’t use it from a Task sequence, at least not natively.

1- Use a text editor, copy the following script and save it as a HTA file in the same directory as your package Data source. Then Modify the script Sub StartInstall section, to meet your Program Needs. add an appropriate .ico file in the same directory as the Script.

Download Script ; (PromptReboot)

<!– Author Simon Brouillard Fuction Allow user to postpone Installation

–>

<html>

<head>

<title>App Launcher</title>

<HTA:APPLICATION

ID=”objHTA”

APPLICATIONNAME=”SnoozeInstall”

BORDER=”thick”

BORDERSTYLE=”raised”

CAPTION=”no”

CONTEXTMENU=”no”

ICON=”AM-White.ico”

INNERBORDER=”no”

MAXIMIZEBUTTON=”no”

MINIMIZEBUTTON=”no”

SHOWINTASKBAR=”yes”

NAVIGATABLE=”no”

SCROLL=”no”

SCROLLFLAT=”no”

SELECTION=”no”

SINGLEINSTANCE=”yes”

SYSMENU=”no”

WINDOWSTATE=”normal”

>

</head>

<SCRIPT Language=”VBScript”>

sub DoResize

‘resize

window.resizeTo 550,150

screenWidth = Document.ParentWindow.Screen.AvailWidth

screenHeight = Document.ParentWindow.Screen.AvailHeight

posLeft = (screenWidth – 550) / 2

posTop = (screenHeight – 150) / 2

‘move to centerscreen

window.moveTo posLeft, posTop

end sub

DoResize()

Sub Run_Script

Select Case opt_script.Value

Case “opt_1”

HideWindow1

Case “opt_2”

HideWindow2

Case “opt_3”

HideWindow3

End Select

End Sub

Dim intLeft

Dim intTop

Sub HideWindow1

intLeft = window.screenLeft

intTop = window.screenTop

window.moveTo -2000,-2000

idTimer = window.setTimeout(“ShowWindow”, 1800000, “VBScript”)

End Sub

Sub HideWindow2

intLeft = window.screenLeft

intTop = window.screenTop

window.moveTo -2000,-2000

idTimer = window.setTimeout(“ShowWindow”, 3600000, “VBScript”)

End Sub

Sub HideWindow3

intLeft = window.screenLeft

intTop = window.screenTop

window.moveTo -2000,-2000

idTimer = window.setTimeout(“ShowWindow”, 14400000, “VBScript”)

End Sub

Sub ShowWindow

window.moveTo intLeft,intTop

window.clearTimeout(idTimer)

End Sub

Sub StartInstall

On Error Resume Next

Set objShell = CreateObject(“Wscript.Shell”)

Dim msiname : msiname = “AcroRead.msi”

Dim mstname : mstname = “AcroRead.mst”

Dim logname : logname = “Acroreadlog.log”

Dim strCommand : strCommand = “Msiexec /qn /i ” & msiname & ” TRANSFORMS=” & mstname & ” ” & “ALLUSERS=TRUE” & ” ” & “DISABLE_CACHE=1″ & ” ” & “REBOOT=ReallySuppress'” & ” /l*v ” & logname

objShell.Run strCommand

Set wshshell = Nothing

window.close

End Sub

</SCRIPT>

<body bgcolor=”#F0F0F0″>

<a><img src=”Install.ico” align=”left”></a>

<strong><p align=”left”>Application X will be installed on your PC. If you want to start the installation now, click on INSTALL NOW</p></strong>

<div align=”right”><select id=”opt_script” name=”opt_script” size=”1″>

<option value=”opt_1″>30minutes</option>

<option value=”opt_2″>1 hours</option>

<option value=”opt_3″>4 hours</option>

</select>

<button name=”btn_run” id=”btn_run” accessKey=”R” onclick=”vbs:Run_Script”><u>P</u>ostpone</button>

<input type=”button” value=”Install Now” name=”run_button” onClick=”StartInstall”></div>

</body>

</html>

************************************************************

2- Create a program for your hta script and set these settings.  Maximum Allowed Run time Unknown, Program Can run whether or not a user is logged on, Run with administrative Rights and Allow users to interact with this program

 Also, Note that if necessary you can change the values that I’ve use in the postpone the installation by changing the value “idTimer =…” and <option value=”opt_3″>4 hours</option>

3- Advertise the collection you want to target with your software deployment. For My part, I create a collection with all workstation who already have the application installed. Next, I create a sub collection which will exclude all the member of this newly collection.

Advertisements

One thought on “ALLOW USER TO POSTPONE SCCM SOFTWARE DEPLOYMENT

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