Custom Action in 64-bit MSI problem
Hi!
Stumbled on a problem with "call vbscript from embedded code" in 64-bit vendorMSI (FlashPlayer)
A transform was created for the "mms.cfg" (placed under "\system32\macromed\flash\")
Besides that we always create a unique registry entry with an Custom Action (call vbscript from embedded code)
The code uses RegWrite....
the problem is that the registry entry is written under Software\WoW6432Node (32-bit hive) instead of 64....obviously cscript or something runs in *32-bit and puts the registry entry under WoW6432node....but how do i make it right?
Is it in the code or do i have to specify something in the MSI? The MSI is Vendor 64-bit so my thought was that any action it does was in 64-bit
Just started packaging application for x64 so i need some tips :)
Vbscript:
On Error Resume Next
Dim Productname, Version, Description, Install, InstallDate
Dim obj, databaseObj, suminfo
Set databaseObj = session.Database
Set suminfo = databaseObj.SummaryInformation
Productname = session.property("ProductName")
Version = session.property("ProductVersion")
Description = suminfo.Property(3)
Install = "1"
InstallDate = cstr(Date) + " " + cstr(Time)
set obj = CreateObject("Wscript.Shell")
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\", "", "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\", "", "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\Description", Description, "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\Install", Install, "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\InstallDate", InstallDate, "REG_SZ"
//Asman
Stumbled on a problem with "call vbscript from embedded code" in 64-bit vendorMSI (FlashPlayer)
A transform was created for the "mms.cfg" (placed under "\system32\macromed\flash\")
Besides that we always create a unique registry entry with an Custom Action (call vbscript from embedded code)
The code uses RegWrite....
the problem is that the registry entry is written under Software\WoW6432Node (32-bit hive) instead of 64....obviously cscript or something runs in *32-bit and puts the registry entry under WoW6432node....but how do i make it right?
Is it in the code or do i have to specify something in the MSI? The MSI is Vendor 64-bit so my thought was that any action it does was in 64-bit
Just started packaging application for x64 so i need some tips :)
Vbscript:
On Error Resume Next
Dim Productname, Version, Description, Install, InstallDate
Dim obj, databaseObj, suminfo
Set databaseObj = session.Database
Set suminfo = databaseObj.SummaryInformation
Productname = session.property("ProductName")
Version = session.property("ProductVersion")
Description = suminfo.Property(3)
Install = "1"
InstallDate = cstr(Date) + " " + cstr(Time)
set obj = CreateObject("Wscript.Shell")
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\", "", "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\", "", "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\Description", Description, "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\Install", Install, "REG_SZ"
obj.RegWrite "HKLM\Software\%Company%\%Company%Inst\" + Productname + "\" + Version + "\InstallDate", InstallDate, "REG_SZ"
//Asman
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
SandeepPanat
12 years ago
Posted by:
SandeepPanat
12 years ago
Posted by:
asman
12 years ago
I will check first thing tomorrow, im currently not at work...but i instantly google'd it.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa368241(v=vs.85).aspx
Is that something in the right direction?
)
Windows Installer may use 64-bit custom actions on 64-bit operating systems. A 64-bit custom action based on scripts must include the msidbCustomActionType64BitScript bit in its numeric type. For information see 64-bit Custom Actions. Include the following value in the Type column of the CustomAction table to specify the basic numeric type of a 64-bit custom action.
msidbCustomActionTypeVBScript + msidbCustomActionTypeBinaryData + msidbCustomActionType64BitScript 0x0001006 4
Hexadecimal:0x0001006 Decimal:4102
)
Great respons btw, thank you
http://msdn.microsoft.com/en-us/library/windows/desktop/aa368241(v=vs.85).aspx
Is that something in the right direction?
)
Windows Installer may use 64-bit custom actions on 64-bit operating systems. A 64-bit custom action based on scripts must include the msidbCustomActionType64BitScript bit in its numeric type. For information see 64-bit Custom Actions. Include the following value in the Type column of the CustomAction table to specify the basic numeric type of a 64-bit custom action.
msidbCustomActionTypeVBScript + msidbCustomActionTypeBinaryData + msidbCustomActionType64BitScript 0x0001006 4
Hexadecimal:0x0001006 Decimal:4102
)
Great respons btw, thank you
Posted by:
anonymous_9363
12 years ago
Posted by:
asman
12 years ago
I was waiting for that response :)
Your absolutely right.
A 3rd party software scans the network and check those specific registry values's and if they missmatch something bad happens (short explanation)
We use that vbscript as a template just to be safe and save some time.....it always goes down to save time sadly enough :)
Besides, i'v learned something new!
Your absolutely right.
A 3rd party software scans the network and check those specific registry values's and if they missmatch something bad happens (short explanation)
We use that vbscript as a template just to be safe and save some time.....it always goes down to save time sadly enough :)
Besides, i'v learned something new!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.