/build/static/layout/Breadcrumb_cap_w.png

Single WSI , 32 and 64 bit MSI - How to detect?

Hi,

I've been battling with this issue for a good while now. Here's whats going on, I have a single WSI (Wise Installation Studio 7 being used) The WSI creates the 2 MSI's, 32 bit and 64 bit, each with their respective components.

So, how do I stop the 32 bit MSI being installed on the 64 bit machines? Given that I only have a single WSI project file.

Note. Preventing a 64 bit MSI on 32 bit is automatic, but not visa-versa.

I know the answer lies in either MSIx64 or VersionNT64 properties, but I dont know how to ask the seemingly simple question of:

IF I am a 32 bit MSI running on a 64 bit machine THEN end!!!

This code must reside within the single WSI file therefore it should not conflict with the x64 release.

If anyone has any suggestions it would be of great help!

Paul

0 Comments   [ + ] Show comments

Answers (19)

Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
open your help files and read about the component table

read about the attributes ( column)
Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
The WSI creates the 2 MSI's, 32 bit and 64 bit, each with their respective components

not sure what you mean here
Posted by: AngelD 14 years ago
Red Belt
0
Use a launch condition (LaunchCondition table) in conjunction with the VersionNT64 property
Posted by: HotSpot 14 years ago
Orange Senior Belt
0
Cygan, just for clarification... Wise allows you to build multiple releases, so in my case I have a single WSI project file that builds both a 32bit MSI and 64bit MSI.

AngelID, thanks for the info, as you probably will know if I were to add this launch condition to the WSI it would apply to both 32 and 64 bit releases. As this software is integrated into a build server I will need to run the initial compilation to build the releases and then inject this "LaunchCondition" only into the 32 bit MSI.

Automation of all processes is required as we do at least 2 builds a day.



This leads me on to another question....

How can I add a "LaunchCondition" of "VersionNT64" into the table of the MSI via a script?


Thanks for your help so far!
Posted by: anonymous_9363 14 years ago
Red Belt
0
One, you can use the condition in both MSIs since it will be True for one and False for the other.

Two, get hold of the Windows Installer SDK (I think it may only be available as part of the much larger Platform SDK these days...) In there will be a number of sample scripts which should you how to create the WindowsInstaller.Installer object, how to open the MSI database, access tables and query/update the tables.
Posted by: HotSpot 14 years ago
Orange Senior Belt
0
Thanks for the pointer to the SDK.

If I have the condition in both the x86 and x64 releases the x64 never gets installed. Thats why I need to create the condition in the WSI file and then deleted it manually out of the x64 release.

Paul
Posted by: AngelD 14 years ago
Red Belt
0
I can't recall how WIS handles releases but in WPS (Wise Package Studio) you can select which release to work with, make the changes and then save/compile.
If this is the case with WIS then just select which release to work with (make sure to compile to different MSI files) and hit to compile.
Posted by: HotSpot 14 years ago
Orange Senior Belt
0
Thanks for all you pointers, if anyone else is working with a similar issue where no manual intervention can be performed then here's some code to add to your build scripts to remove LaunchConditions from an MSI after it has been compiled.


'Code to remove all launch conditions from x64 MSI

Const msiOpenDatabaseModeTransact = 1
Dim installer
Dim db
Dim view
Set installer = CreateObject("WindowsInstaller.Installer")
Set db = installer.OpenDatabase("Agent_x64.msi", msiOpenDatabaseModeTransact)

Set view = db.OpenView ("DELETE FROM LaunchCondition")

view.Execute
view.close
Set view = nothing
db.commit
Set db = nothing
Posted by: razorfish228 12 years ago
Yellow Belt
0
OK, I'm confused on how to do this. Here's my scenerio: I have a 64 bit MSI and a 32bit MSI and I want to detect if the machines is a 64 or 32 bit and than if its a 32 bit for example, I don't want it to run and exit quietly. How do you do this in WISE? Can someone point me for an example of how to create either a launch condition and I do NOT want any message popping up, I just want it to exit silently.
Posted by: anonymous_9363 12 years ago
Red Belt
0
http://csi-windows.com/toolkit/csi-getosbits

Gosh...that was hard. I need a lie-down...
Posted by: razorfish228 12 years ago
Yellow Belt
0
OK, here's what I figured out.

In Wise, I go into launch condition and than I add:
(Not VersionNT-500) And (Not VersionNT=501) And (Not VersionNT=502) And (Not VersionNT=600) And (Not VersionNT=601 And Not (MsiNTProductType=1)))

Than you execute the MSI with a /qb-

This makes the MSI ONLY run on Windows7 64bit and it will be silent. If you run it say on XP, it will launch but close Silently.
Posted by: anonymous_9363 12 years ago
Red Belt
0
None of those properties tells you whether the OS is running 32-bit or 64-bit but, hey, why would I care?

Hint:
VersionNT64
Posted by: razorfish228 12 years ago
Yellow Belt
0
I'm sorry, but in my case, I really don't care. I'm trying to make it as easy as possible to make sure a 64 bit MSI doesn't run on a 32 bit OS. You can get really complex with WMI, VB, but I was trying to figure out a solution which would be easy for anyone to follow.

Just trying to help others.
Posted by: anonymous_9363 12 years ago
Red Belt
0
I'm trying to make it as easy as possible to make sure a 64 bit MSI doesn't run on a 32 bit OSIn that case, you have failed since, as I say, none of the properties in your condition determine whether or not the OS is running 64-bit.
Posted by: razorfish228 12 years ago
Yellow Belt
0
Its common sense you can change my logic and use VersionNT64 and not run on 32 bit OS. In my scenerio once again, I only wanted the 64bit MSI to run only on NT64 and not run on XP as an example. I tested this already and its working great for my case.
Posted by: Arminius 12 years ago
Second Degree Green Belt
0
Windows has properties that tell if it's 32 vs 64 bit OS. Windows Metrics (winmetrics in Winbatch) -7 checks that. You can also search the registry for wow6432 node or check for ProgramFiles (x86), which don't exist in 32bit Windows.
Posted by: spirosl 12 years ago
Senior Yellow Belt
0
HotSpot/VBScab - Thanks for the heads up on the VersionNT64 property. I've just read the property on the MSDN site (ref: http://msdn.microsoft.com/en-us/library/windows/desktop/aa372497(v=vs.85).aspx) and that it requires WI 4.0+. This won't matter for deployments under Windows 7 in my current situation (as we are going through a migration project - aren't we all!) but it's something for me to take into account when packaging for our current Windows XP environment which is currently utilising WI 3.1. I would usually script the detection in a VB Script and then if all conditions were met; to install the MSI with any associated transforms , etc).
Posted by: rajend07 12 years ago
Yellow Belt
0
i have a feature1,feature2 in fea1 shortcut is available and fea2 as keypath is available in keypath is missing selfheal go or not
Posted by: spartacus 12 years ago
Black Belt
0
ORIGINAL: rajend07

i have a feature1,feature2 in fea1 shortcut is available and fea2 as keypath is available in keypath is missing selfheal go or not


Sorry, but without sounding disrespectful, you've lost me (and possibly many others) on this one.

A starting point might be to post a fresh base note rather than adding to an existing (and unrelated) thread. Even then, you will need to add much more information about the issue you are facing to stand a chance of getting help here.

Spartacus
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