/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (6)

Posted by: SandeepPanat 12 years ago
Orange Senior Belt
2
Yes, that is the exact link which I wanted you to refer to.
The embedded VBScript that gets stored in binary table has Type 6.
You need to add 4096 to this type, making it to 4102 for 64 bit scripting flag.
Posted by: SandeepPanat 12 years ago
Orange Senior Belt
0
What is the value for 'Type' column in the custom action table?
Posted by: asman 12 years ago
Purple Belt
0
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
Posted by: asman 12 years ago
Purple Belt
0
Awesome, thanks again!
Posted by: anonymous_9363 12 years ago
Red Belt
0
Er...why not go mad and use the Registry table for writing registry entries?
Posted by: asman 12 years ago
Purple Belt
0
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!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ