I have problem to get an installed product's InstallLocation with
'installer' object. Here is my code in InstallScript, can anybody help me to
figure out what the problem is?
-------------------------------------
set installer = CreateObject("WindowsInstaller.Installer");
set prods = installer.Products;
nProds=prods.Count;
for i=0 to nProds-1
if (installer.ProductInfo(prods.Item(i), "InstalledProductName")= "My
Product") then
// It did find 'My Product' in the installed products....
// I am expecting the 'InstallLocation's value will be saved to szInst
in below, but nothing there! Why?
szInst = installer.ProductInfo(prods.Item(i), "InstallLocation");
endif;
endfor;
------------------------------------------
Maybe there is a better way to do so, any suggestion is welcom.