I try:
Shell "msiexec /x package.msi"
But I don’t know the path of package.msi, then fail.
What can I do?
Suggestions...
Thanks in advanced.
--
Juan Marcial
Ingeniero de Software
Is there an uninstall shortcut for the app in the Start Menu?
Have you gone to Add/Remove Programs in Control Panel (assuming WinXP or
earlier, off-hand don't remember how to get to that under Vista).
Have you tried re-running the app's Setup? Frequently, when that's run for
an installed application, it provides an option to uninstall and/or repair
(especially if it uses Windows Installer, as you said this one does).
Have you contacted the author of the program for instructions on how to
uninstall it?
--
Mike
P.S. I really don't see this as being a VB-related question. It's
irrelevant that the app was written with VB6.
Try the MSI group for a better explanation:
microsoft.public.msi.platformsdk
> I need uninstall a VB6 application. This application was installed with a
> msi package.
>
> I try:
> Shell "msiexec /x package.msi"
> But I donā?Tt know the path of package.msi, then fail.
Private Function GetGUID(pAppName As String) As String
Dim ws
Dim pc
Dim subkey
Dim subkeys
Dim app
Dim r
Dim kp
Dim RawGuid
Dim Guid
Const HKEY_LOCAL_MACHINE = &H80000002
On Error Resume Next
Set ws = CreateObject("WScript.Shell")
pc = "."
Set r = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
pc & "\root\default:StdRegProv")
kp = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
r.EnumKey HKEY_LOCAL_MACHINE, kp, subkeys
For Each subkey In subkeys
app = ws.RegRead("HKLM\" & kp & "\" & subkey & "\DisplayName")
If InStr(app, pAppName) > 0 Then
RawGuid = ""
Guid = ""
RawGuid = ws.RegRead("HKLM\" & kp & "\" & subkey &
"\UninstallString")
Guid = Mid(RawGuid, InStr(RawGuid, "{"), 38)
If Not Guid = "" Then
GetGUID = Guid
Exit For
End If
End If
Next
Set ws = Nothing
End Function
--
<Harvey Triana />
http://vexpert.mvps.org
"mayayana" <mayaX...@rcXXn.com> escribió en el mensaje de noticias
news:%23VjIMcy...@TK2MSFTNGP05.phx.gbl...
Regards,
--
<Harvey Triana />
http://vexpert.mvps.org
"Harvey Triana" <harvey...@hotmail.com> escribió en el mensaje de
noticias news:O2PUMp4K...@TK2MSFTNGP06.phx.gbl...
With that you're getting the GUID for use with
the Windows Installer object model? Why
not just run the UninstallString, like one would
do for any other software? At this point in the
function you've already done all the work of
hunting it down.
"Harvey Triana" wrote:
> >>> But I donâ?Tt know the path of package.msi, then fail.