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
> >>
> >>
> >>
> >>
> >
>
>