Hi,
Thanks for the tips! To add a little bit more info, I'm working in
Powershell for various reasons, so P/Invoke is out of the question.
Using WMI is easy enough, but I'd prefer not to be mucking around
inside Windows Installer if I can help it.

Is there any reason to not include an entry (e.g.
HKLM:\SOFTWARE\Microsoft\IronPython\InstallPath) that stores the
installation path?. It's easy enough to do with WiX.

- Jeff

On Tue, Dec 23, 2008 at 11:21 AM, Curt Hagenlocher <c...@hagenlocher.org> wrote:
> I think that's just the WMI way of doing an MsiProductInfo call :).  Though
> it sure is a lot more managed- and Python- friendly than having to do a
> P/Invoke.
>
> On Tue, Dec 23, 2008 at 10:17 AM, Oleg Tkachenko <ole...@microsoft.com>
> wrote:
>>
>> Actually we do store install location in the registry. It can be found
>> somewhere deep in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer
>> subtree.
>>
>> It also can be queried using System.Management.Instrumentation:
>>
>>
>>
>>             ManagementObjectSearcher query1 = new
>> ManagementObjectSearcher(
>>
>>                 "SELECT * FROM Win32_Product where InstallState = 5 and
>> Caption = 'IronPython 2.0'");
>>
>>             ManagementObjectCollection queryCollection1 = query1.Get();
>>
>>
>>
>>             foreach (ManagementObject mo in queryCollection1) {
>>
>>                 Console.WriteLine(mo["InstallLocation"]);
>>
>>             }
>>
>>
>>
>> --
>>
>> Oleg
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to