Uninstalling Act v6 Silently and Forefully
Made vbs to uninstall act v6 from my computer. The vbs works but I have to click next and Yes to all. I need help on making it by pass that and automatically uninstall everything with out prompting me so i can push it out through AD as a log on script.
All the computers are XP and when i go to start > all programs> act > uninstaller and Rclick look at the properties this is the target of the unsinstaller:
C:\WINDOWS\IsUnInstAct.exe -f"C:\Program Files\ACT\Uninst6.isu" -c"C:\Program Files\ACT\UNINSTAL.DLL"
---------------------------------------------------------
Set WshShell = Nothing
Set oReg = Nothing
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
Set WshShell = WScript.CreateObject("WScript.Shell")
' Uninstall first application...
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ACT!"
strValueName = "UninstallString"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath
If IsNull(strUninstallFullPath) Then
' wscript.echo "Uninstall path for app1 is null"
Else
WshShell.Run strUninstallFullPath,8,true
All the computers are XP and when i go to start > all programs> act > uninstaller and Rclick look at the properties this is the target of the unsinstaller:
C:\WINDOWS\IsUnInstAct.exe -f"C:\Program Files\ACT\Uninst6.isu" -c"C:\Program Files\ACT\UNINSTAL.DLL"
---------------------------------------------------------
Set WshShell = Nothing
Set oReg = Nothing
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
Set WshShell = WScript.CreateObject("WScript.Shell")
' Uninstall first application...
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ACT!"
strValueName = "UninstallString"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath
If IsNull(strUninstallFullPath) Then
' wscript.echo "Uninstall path for app1 is null"
Else
WshShell.Run strUninstallFullPath,8,true
0 Comments
[ + ] Show comments
Answers (12)
Please log in to answer
Posted by:
dcataldo
15 years ago
Ok so I tried a different approach since I am having a hard time finding the right switches to run it silently and forcefully I am trying to use Send Keys in my vbs but for some reason they work and sometimes they don’t work i don’t know here is my updated code some please help.
-----------------------------------------------------------------------------------------------------------------------------------
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
Set WshShell = WScript.CreateObject("WScript.Shell")
' Uninstall first application...
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ACT!"
strValueName = "UninstallString"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath
If IsNull(strUninstallFullPath) Then
' wscript.echo "Uninstall path for app1 is null"
Else
WshShell.Run strUninstallFullPath,8,true
Set oShell = CreateObject("Wscript.Shell")
oShell.AppActivate ("Confirm File Deletion")
oShell.SendKeys "ENTER"
oshell.AppActivate ("Remove Program Files?")
oshell.SendKeys "TAB""ENTER"
End If
Set WshShell = Nothing
Set oReg = Nothing
-----------------------------------------------------------------------------------------------------------------------------------
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
Set WshShell = WScript.CreateObject("WScript.Shell")
' Uninstall first application...
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ACT!"
strValueName = "UninstallString"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath
If IsNull(strUninstallFullPath) Then
' wscript.echo "Uninstall path for app1 is null"
Else
WshShell.Run strUninstallFullPath,8,true
Set oShell = CreateObject("Wscript.Shell")
oShell.AppActivate ("Confirm File Deletion")
oShell.SendKeys "ENTER"
oshell.AppActivate ("Remove Program Files?")
oshell.SendKeys "TAB""ENTER"
End If
Set WshShell = Nothing
Set oReg = Nothing
Posted by:
anonymous_9363
15 years ago
SendKeys really is the Spawn of the Devil. I suspect the reason that it sometimes works and sometimes doesn't is because your AppActivate commands attempt to activate a window which, at the point of execution in the script, doesn't exist.
TBH, you would do better to determine exactly what gets installed by the installer and build an uninstall package or, at worst, an uninstall script. For the latter route [puts on drum to bang], remember to have the script assume NOTHING. Add error-trapping to EVERY part, even stuff like WScript.Shell object creation.
TBH, you would do better to determine exactly what gets installed by the installer and build an uninstall package or, at worst, an uninstall script. For the latter route [puts on drum to bang], remember to have the script assume NOTHING. Add error-trapping to EVERY part, even stuff like WScript.Shell object creation.
Posted by:
bkelly
15 years ago
If you do go the SendKeys route, get yourself AutoIt. There is an AutoItX DLL you can use to so that you can still script in VBS. With this, you can programaticly wait for windows to appear and click specific buttons-- no tabbing around or hoping a window or button is where it is expected. A well written AutoIt script will wait for a window to appear and be prepared to fail gracefully if things don't go as planned (which with AutoIt, you can actually know).
Posted by:
dcataldo
15 years ago
Posted by:
dcataldo
15 years ago
ok tell me vbscab i have the script and it works but I don’t know the switches to make installer go through. I don’t want the users clicking next or seeing anything. That’s why I went with sendkeys approach. Do you have any other idea I would greatly appreciate it. Also I will inform you I am not skilled in scripting.
Posted by:
anonymous_9363
15 years ago
i have the script and it worksWell, you already told that in some cases, it doesn't. Your choices come down to installing, learning and using AutoIt (a kludge) or creating an uninstall package/script.
If you have MSI authoring software, I'd capture an uninstall of the product and use the resulting MSI.
Posted by:
bkelly
15 years ago
Posted by:
dcataldo
15 years ago
Ok guys after trying so hard with my vbs and sendkeys the ans was in front of my face the whole time. I found it by mistake but hey I don’t care it works lol. Here the line to uninstall it silently forcefully and delete all files.. I thank everyone for their help and participation.
C:\WINDOWS\IsUnInstAct.exe -f"C:\Program Files\ACT\Uninst6.isu" -c"C:\Program Files\ACT\UNINSTAL.DLL" -a -x
REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ACT! /f
C:\WINDOWS\IsUnInstAct.exe -f"C:\Program Files\ACT\Uninst6.isu" -c"C:\Program Files\ACT\UNINSTAL.DLL" -a -x
REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ACT! /f
Posted by:
anonymous_9363
15 years ago
Posted by:
dcataldo
15 years ago
Posted by:
anonymous_9363
15 years ago
I am new to this site so tell me what i have to doYou do know how to read and click links, though, don't you?
At the top of every page on AppDeploy is the 'Package KB' link which takes you here http://www.appdeploy.com/packages/ . Click the 'Create new entry' button. Note that entries are checked by moderators before they're posted to the KB so you need to wait a while before it appears. Once that's happened, you can return to this thread and link the KB entry to the thread. I'll leave you to work out how to do that: it involves reading and clicking :)
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.