Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sunday, October 10, 2010 7:18 PM
This is complicated, but here goes:
I have an Access 2007 Runtime application for distribution to users. When I package it using Runtime package I give it a GUID (the Runtime packaging software calls it "Product Code") specified by me according to strict Microsoft guidlines. I can also specify Major Version, Minor Version, Publisher etc. etc. When the user installs the product, the MsiExec.exe or setup.ini file generates the GUID I specified on the users computer with corresponding DisplayVersion, Publisher etc. information.
If the user has a Windows 64-bit machine, the GUID is installed in:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ (note the extra sub-directory layer here)
If it is a 32-bit machine, the GUID is installed in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
I have a pop-up form in the application called by a command button that gives the user DisplayVersion, Publisher (me), DisplayName etc. I have the VBA code that extracts DisplayVersion, DisplayName etc from any specific GUID. But I can't seem to get the GUID itself generated at install time. If I can get that, then I can replace the hard-coded GUID in the code with the GUID as a named string.
So I my question is this: Is there Access 2007 VBA code to "get" or "extract" the GUID generated by the MsiExec.exe or setup.ini file when the user installs the product? I have so little experience dealing with system-level VBA code that I am stumped. I don't know what Declarations I need or what commands to use. I hope you understand what I am trying to do. Thank you so much.
Larry
Wednesday, October 13, 2010 11:33 PM
Hello Larry,
I understand that you're trying to retrieve the GUID assigned by the Windows Installer when your Access package is installed. Unfortunately this type of issue is beyond what we support in this forum. Although what you're looking to do may be possible in VBA, it is not something that is natively supported by Access and will likely require something like automating the Windows Installer.
It seems possible that you can get what you need by utilizing the MsiGetProductInfoEx Function to fetch the ProductID as described on the following page: http://msdn.microsoft.com/en-us/library/aa370131(v=VS.85).aspx. As stated, though, this is beyond the help that we offer in this particular group.
Best Regards,
Nathan Ost
Microsoft Online Community Support
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.