Tuesday, 15 April 2014

Uninstall Office Project 2010

This post will explain Step by Step instruction How to uninstall Project 2010 using SCCM 2007 with Zero Touch 




1.Create “SilentUninstallConfig.xml” and past in “Prjpro.WW” Folder 

https://lh5.googleusercontent.com/broHfR0SEumIWxBD4fqxYhgVRzzCTg6E7_Q3Bi7eDnLFI_qD-4ml7mVoQGs-Dt-GXRNE9f2SvO1OjDm25xRkPyai9DnAHdzHJmu9pLPtPtESvWsx-6mA2S3vhaivmHIzHLvFeFQ

2.Create SilentUninstallConfig.xml using the below code
<Configuration Product="PrjPro">
<Display Level="basic" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
<Setting Id="Reboot" Value="Never" />
<Setting Id="SETUP_REBOOT" Value="Never" />
</Configuration>

3.Create Uninstall CMD using the below command
"%~dps0setup.exe" /uninstall PrjPro /config .\PrjPro.WW\SilentUninstallConfig.xml
Place the Uninstall CMD in the Office setup.exe folder

4.Create Uninstall VBS to uninstall the Project 2010 without restart in the end of the uninstall if "Project or any office applications " is in open.
Uninstall.vbs
Dim Retval
Retval=0


' *** Install Application. ***
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")


' open normal and don't wait
WSHShell.Run "Uninstall.cmd", 1, True
Set WSHShell = Nothing


' *** show us what RETVAL is, unrem to see what retval = ***
 'MsgBox "The actual return code was " &retval


' *** unrem to set to 3010 for testing ***
'retval = 3010


If retval = 3010 Then
MsgBox "The return code was 3010, resetting to 0"
else
'MsgBox "The actual return code was " &retval
WScript.Quit(Retval)
End If


' *** set the return value to 0 anyway. ***
Retval=0
MsgBox "The return code was reset to 0"
WScript.Quit(Retval)

5.Run the Uninstall.vbs in SCCM program.  


References:

http://myitforum.com/cs2/blogs/nbrady/archive/2010/07/28/preventing-task-sequence-reboot-after-software-install-which-produces-a-3010-exit-code.aspx

Tuesday, 8 April 2014

OK Cancel Response for Application using VBS

Dim LResponse
LResponse = MsgBox("Do you wish to continue", vbOKCancel, "Installation")

If LResponse = vbOK Then
  dim shell
   set shell=createobject("wscript.shell")
   shell.run "Install.cmd"
Else
 
End If