vbdev04
07-19-2004, 10:58 AM
hi,
Im trying to uninstall and app and answer some prompts using the send key. Can anyone help?
Here is my code:
On Error Resume Next
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set WSHShell = CreateObject("WScript.Shell")
Dim vbOkCancel
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
EasysyncInstalled = 0
For Each subkey In arrSubKeys
MsgBox subkey
If subkey = "{BBC30BDF-B735-11D5-BA75-00105AE05C5D}" Then
UninstallString = Wshshell.regread("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BBC30BDF-B735-11D5-BA75-00105AE05C5D}\UninstallString")
WSHShell.Run (UninstallString)
End If
Im trying to uninstall and app and answer some prompts using the send key. Can anyone help?
Here is my code:
On Error Resume Next
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set WSHShell = CreateObject("WScript.Shell")
Dim vbOkCancel
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
EasysyncInstalled = 0
For Each subkey In arrSubKeys
MsgBox subkey
If subkey = "{BBC30BDF-B735-11D5-BA75-00105AE05C5D}" Then
UninstallString = Wshshell.regread("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BBC30BDF-B735-11D5-BA75-00105AE05C5D}\UninstallString")
WSHShell.Run (UninstallString)
End If