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 From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Curt Hagenlocher Sent: Tuesday, December 23, 2008 9:28 AM To: Discussion of IronPython Subject: Re: [IronPython] Detecting IronPython Installation Directory Looking at the WiX source (is that included in the source distribution?), it doesn't appear that we're deliberately writing this information into the registry. But the MsiProductInfo function should be able to retrieve it from the sekrit Windows Installer stash. http://www.pinvoke.net/default.aspx/msi/MsiGetProductInfo.html Alas, I don't imagine this can be easily accessed from within IronPython itself, but as Michael suggests, there are simpler ways of doing that :). On Mon, Dec 22, 2008 at 6:10 PM, Jeff Hardy <jdha...@gmail.com<mailto:jdha...@gmail.com>> wrote: Hi, Does the IronPython 2.0 installer write the installation directory to a registry key (besides the WIndows Installer keys)? If not, could that be added to a future release? Or, is there another way to get the installation directory? -Jeff _______________________________________________ Users mailing list Users@lists.ironpython.com<mailto:Users@lists.ironpython.com> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com