So I have a project that installs with an MSI, and I need to be able to get it's install directory later on from somewhere else.
This works:
int a = 512;
StringBuilder sb2 = new StringBuilder(a);
MsiGetProductInfo("{2E2C2AD2-6F72-44D4-925B-4F6130A241D8}", "InstallSource", sb2, ref a);
Console.Write(sb2.ToString());
Console.ReadLine();
and returns the path to the MSI I used to install it. But when I sub in InstallLocation, I just get back nothing as a result. What am I doing wrong?
I found the place in the registry where all this data is coming from: hklm\software\microsoft\windows\currentversion\installer\userdata\s-1-5-18\products\myguid\
The InstallLocation is blank. That doesn't make any sense, because I just installed it and It obviously installed somewhere (The default location)
Or does default location just mean a blank entry for InstallLocation?
Call me when you can say, "Find all duplicate rows with duplicate email addresses and move the duplicate rows to a new sheet", and Copilot can execute that and not give you VBScript to write to do it.
If anyone thinks AI isn't in its infancy and the bubble is about to burst, try to do anything meaningful in Excel with Copilot and you will realize AI hasn't even made it to kindergarten in most use cases yet.
I have installed all their components from store.rg-adguard.net.
I encountered an unusual issue with Microsoft Edge that I installed manually. When I disable “Shadows under windows” in the Windows performance settings, the menus in Edge display sharp corners instead of rounded ones.
I don't think the problem is related to a debloated version of Windows, as I experienced the same issue on a standard Windows machine in the past.
"AI has just arrived, how is it possible they're already losing jobs?” Huang said."
Hey idiot. It's called these stupid companies spending too much on your AI ###### and having to layoff employees to cover the cost.
Question
Linkinfamous
Hi.
So I have a project that installs with an MSI, and I need to be able to get it's install directory later on from somewhere else.
This works:
int a = 512; StringBuilder sb2 = new StringBuilder(a); MsiGetProductInfo("{2E2C2AD2-6F72-44D4-925B-4F6130A241D8}", "InstallSource", sb2, ref a); Console.Write(sb2.ToString()); Console.ReadLine();and returns the path to the MSI I used to install it. But when I sub in InstallLocation, I just get back nothing as a result. What am I doing wrong?
I found the place in the registry where all this data is coming from: hklm\software\microsoft\windows\currentversion\installer\userdata\s-1-5-18\products\myguid\
The InstallLocation is blank. That doesn't make any sense, because I just installed it and It obviously installed somewhere (The default location)
Or does default location just mean a blank entry for InstallLocation?
Link to comment
https://www.neowin.net/forum/topic/569064-get-install-directory-from-msi-guid/Share on other sites
5 answers to this question
Recommended Posts