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
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
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
Answered 03/11/2009 by: dcataldo
Senior Yellow Belt

Please log in to comment
0
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.
Answered 03/12/2009 by: VBScab
Red Belt

Please log in to comment
0
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).
Answered 03/12/2009 by: bkelly
Red Belt

Please log in to comment
0
Ok with autoit do i have to install it on everyuser machine. Because i want to push this script out through GP. Or can i live the dll file in the path were im pushing out my script
Answered 03/12/2009 by: dcataldo
Senior Yellow Belt

Please log in to comment
0
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.
Answered 03/12/2009 by: dcataldo
Senior Yellow Belt

Please log in to comment
0
i have the script and it works Well, 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.
Answered 03/13/2009 by: VBScab
Red Belt

Please log in to comment
0
FYI, if you don't have AutoIt deployed, it offers the ability to create an executable you can distribute without the external dependency of a script.
Answered 03/13/2009 by: bkelly
Red Belt

Please log in to comment
0
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
Answered 03/13/2009 by: dcataldo
Senior Yellow Belt

Please log in to comment
0
Great work. Perhaps you could enter a 'Command Line' in the 'Package KB' for this application?
Answered 03/13/2009 by: VBScab
Red Belt

Please log in to comment
0
Perhaps you could enter a 'Command Line' in the 'Package KB' for this application?


Ya i have no problem doing that I am new to this site so tell me what i have to do.
Answered 03/13/2009 by: dcataldo
Senior Yellow Belt

Please log in to comment
0
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 :)
Answered 03/16/2009 by: VBScab
Red Belt

Please log in to comment
0
Ok its done. Thanks for your help again..
Answered 03/16/2009 by: dcataldo
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity