Here is the full code......my point is to have the SENDKEY option automatically answer OK after the install instead of the dialogue box sitting there and displaying "uninstall was successful" and waiting on user to press the ENTER key
If Exist ("C:\Program Files\Pivotal\Relation")
If Exist ("C:\Documents and Settings\All Users\Start Menu\Programs\Relationship 99")
Run '"regsvr32 /u Rn1colan.dll",4160,2' Run '"regsvr32 /u RsMorMSoutlook.exe",4160,2'
Del "C:\Program Files\Pivotal\Relation\Imsync.dll" Del "C:\Program Files\Pivotal\Relation\Isyncps.dll" Del "C:\Program Files\Pivotal\Relation\Isysmps.dll" Del "C:\Program Files\Pivotal\Relation\NserverCa.dll" Del "C:\Program Files\Pivotal\Relation\NserverCps.dll" Del "C:\Program Files\Pivotal\Relation\Rn1cdata.dll" Del "C:\Program Files\Pivotal\Relation\Rn1colan.dll" Del "C:\Program Files\Pivotal\Relation\Rn1dobj.dll" Del "C:\Program Files\Pivotal\Relation\Info.exe" Del "C:\Program Files\Pivotal\Relation\RSMforMSOutlook.exe" Del "C:\Program Files\Pivotal\Relation\NserverC.exe"
DelProgramItem ("Relationship 99")
;This command line uninstalls Relationship from user computer.
$Msg = MessageBox('Please wait while Relationship is uninstalled','ESI International',,5)
Shell 'C:\WINDOWS\uninst.exe /s -y -f"C:\Program Files\Pivotal\Relation\DeIsl1.isu"'
$rc = SendKeys ("{Enter}")
;This command line will Reboot the computer within 10 seconds after completion of uninstallation
$RC = Shutdown("","System is being rebooted to enable new settings.", 10, 1, 1)
Else
Quit
EndIf
|