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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
What is the value for 'Type' column in the custom action table?
Answered 01/02/2012 by: SandeepPanat
Orange Senior Belt

Please log in to comment
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
Answered 01/02/2012 by: asman
Purple Belt

Please log in to comment
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.
Answered 01/02/2012 by: SandeepPanat
Orange Senior Belt

Please log in to comment
0
Awesome, thanks again!
Answered 01/02/2012 by: asman
Purple Belt

Please log in to comment
0
Er...why not go mad and use the Registry table for writing registry entries?
Answered 01/02/2012 by: VBScab
Red Belt

Please log in to comment
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!
Answered 01/02/2012 by: asman
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity