Hi-
I need uninstall a VB6 application. This application was installed with a
msi package.

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

Re: Uninstall a product with VB6 code by MikeD

MikeD
Fri Oct 10 16:07:18 CDT 2008


"Juan Marcial" <eslender2007@hotmail.com> wrote in message
news:10F465CE-EAE6-483A-ABF6-4267293C921F@microsoft.com...
> Hi-
> I need uninstall a VB6 application. This application was installed with a
> msi package.
>
> I try:
> Shell "msiexec /x package.msi"
> But I donâ??t know the path of package.msi, then fail.
> What can I do?
> Suggestions...
>


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.



Re: Uninstall a product with VB6 code by mayayana

mayayana
Fri Oct 10 17:27:07 CDT 2008

If you look in
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
you'll see that most (all?) uninstall strings for
MSI installs use a GUID rather than a path.

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.
> What can I do?
> Suggestions...
>
> Thanks in advanced.
> --
> Juan Marcial
> Ingeniero de Software





Re: Uninstall a product with VB6 code by Harvey

Harvey
Sat Oct 11 05:15:25 CDT 2008

Can get GUID with this funcion:

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" <mayaXXyana@rcXXn.com> escribió en el mensaje de noticias
news:%23VjIMcyKJHA.1156@TK2MSFTNGP05.phx.gbl...
> If you look in
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
> you'll see that most (all?) uninstall strings for
> MSI installs use a GUID rather than a path.
>
> 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.
>> What can I do?
>> Suggestions...
>>
>> Thanks in advanced.
>> --
>> Juan Marcial
>> Ingeniero de Software
>
>
>
>


Re: Uninstall a product with VB6 code by Harvey

Harvey
Sat Oct 11 06:29:51 CDT 2008

Juan-
Warning. If runs VB6's Unistall to unistall a VB6 application maybe it
removes VB runtime - great problem here. Instead of write a VBScript for
this.

Regards,
--
<Harvey Triana />
http://vexpert.mvps.org

"Harvey Triana" <harveytriana@hotmail.com> escribió en el mensaje de
noticias news:O2PUMp4KJHA.4600@TK2MSFTNGP06.phx.gbl...
> Can get GUID with this funcion:
>
> 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" <mayaXXyana@rcXXn.com> escribió en el mensaje de noticias
> news:%23VjIMcyKJHA.1156@TK2MSFTNGP05.phx.gbl...
>> If you look in
>> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
>> you'll see that most (all?) uninstall strings for
>> MSI installs use a GUID rather than a path.
>>
>> 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.
>>> What can I do?
>>> Suggestions...
>>>
>>> Thanks in advanced.
>>> --
>>> Juan Marcial
>>> Ingeniero de Software
>>
>>
>>
>>
>


Re: Uninstall a product with VB6 code by mayayana

mayayana
Sat Oct 11 07:57:08 CDT 2008

> RawGuid = ws.RegRead("HKLM\" & kp & "\" & subkey &
> "\UninstallString")
> Guid = Mid(RawGuid, InStr(RawGuid, "{"), 38)

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.







Re: Uninstall a product with VB6 code by eslender2007

eslender2007
Thu Oct 16 08:27:00 CDT 2008

Thanks Harvey. Just that i need.
--
Juan Marcial
Ingeniero de Software


"Harvey Triana" wrote:

> Juan-
> Warning. If runs VB6's Unistall to unistall a VB6 application maybe it
> removes VB runtime - great problem here. Instead of write a VBScript for
> this.
>
> Regards,
> --
> <Harvey Triana />
> http://vexpert.mvps.org
>
> "Harvey Triana" <harveytriana@hotmail.com> escribió en el mensaje de
> noticias news:O2PUMp4KJHA.4600@TK2MSFTNGP06.phx.gbl...
> > Can get GUID with this funcion:
> >
> > 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" <mayaXXyana@rcXXn.com> escribió en el mensaje de noticias
> > news:%23VjIMcyKJHA.1156@TK2MSFTNGP05.phx.gbl...
> >> If you look in
> >> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
> >> you'll see that most (all?) uninstall strings for
> >> MSI installs use a GUID rather than a path.
> >>
> >> 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.
> >>> What can I do?
> >>> Suggestions...
> >>>
> >>> Thanks in advanced.
> >>> --
> >>> Juan Marcial
> >>> Ingeniero de Software
> >>
> >>
> >>
> >>
> >
>
>