Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Retrieving GUID from installation

Retrieving GUID from installation

Scheduled Pinned Locked Moved Visual Basic
toolsquestionworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    T RATHA KRISHNAN
    wrote on last edited by
    #1

    Hi! I've created InnoSetup output files for a VB application a long time ago. I lost the script files(.iss files). But I've the output files(Setup files). Is it possible to install the setup and retrieve the GUID(AppId) from the installation? How?

    D 1 Reply Last reply
    0
    • T T RATHA KRISHNAN

      Hi! I've created InnoSetup output files for a VB application a long time ago. I lost the script files(.iss files). But I've the output files(Setup files). Is it possible to install the setup and retrieve the GUID(AppId) from the installation? How?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      If you're talking about the ProductCode, then this is a script I use by putting a shortcut in the SendTo menu to get it. All I do is right-click the .MSI, Send To -> GetProductCode.

      Dim msi,database,view1,record,productCode

      Set msi = CreateObject("WindowsInstaller.Installer")
      Set database = msi.OpenDatabase(WScript.Arguments(0), 1)

      Set view1 = database.OpenView("SELECT `Value` FROM `Property` WHERE `Property` = 'ProductCode'")
      Call view1.Execute

      Set record = view1.Fetch
      If record Is Nothing Then
      MsgBox "Unable to find a ProductCode in the MSI database!"
      WScript.Quit
      End if

      productCode = record.StringData(1)

      Set record = view1.Fetch
      If record Is Nothing Then
      RecordsReturned = 1
      Else
      RecordsReturned = 2
      End If

      Set record = Nothing
      view1.Close
      Set view1 = Nothing
      Set database = Nothing
      Set msi = Nothing

      If RecordsReturned = 1 Then
      InputBox "The ProductCode is:", WScript.Arguments(0), productCode
      Else
      MsgBox "There was more than one 'ProductCode' record returned from the MSI database!!"
      End If

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups