A last question about compiler variable & ProductCode

For all your non-technical questions.
BenCour
Posts: 4
Joined: Fri Jan 12, 2007 10:09 am

A last question about compiler variable & ProductCode

Postby BenCour » Mon Jan 15, 2007 11:29 am

I do have one last question about compiler variable.

Is it possible to set the product code of the setup based on a compiler variable ?

I tried to add something like this at the very beginning of my setup project.

[compiler if Variable BUILDTYPE Equals TRIAL]
Set Variable $PRODUCTCODE$ to {00000000-0000-0000-0000-000000000000}
[compiler else]
Set Variable $PRODUCTCODE$ to {00000000-0000-0000-0000-
000000000001
[compiler end]

But it has no effect. I also tried without the $ signs around PoductCode but it didnt work either.

Its the only thing remaining to be cleared before we buy. I must admit that i'm pretty pleased with what I have seen so far.

Thanks in advance for your help,

Ben

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: A last question about compiler variable & ProductCode

Postby NickDay » Thu Jun 23, 2011 1:08 pm

I am wanting to do something similar; is it possible to set PRODUCTCODE in my MSI script (which has different versions for different OEMs, which we wish to have installed in parallel)?

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: A last question about compiler variable & ProductCode

Postby NickDay » Mon Jul 04, 2011 5:39 am

Hi Aviv,
I tried #PRODUCTCODE# and I don't think it's working. Do you know for a fact that this is a compiler variable? The manual page on Create Media Center (unrelated to what I'm trying to do) mentions $PRODUCTCODE$ so I think you may be wrong.

What I'm trying to do, specifically is:

My installer enters, and reads a text file which tells it which OEM 'flavour' of installer it is. This part is working.
It then does
Set Variable #PRODUCTCODE# to {41DD4BF3-E3AA- ... a GUID}
and proceeds with the installation.
I want several different OEMs' versions to be able to coexist, you see. At the moment each one forces uninstallation of any other OEM.

After I run the installer, I look in
Registry, HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall
which contains GUID-named folders. I expected to see one with my GUID mentioned above, but I don't.
Can I acheive this, and how, please?

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: A last question about compiler variable & ProductCode

Postby NickDay » Mon Jul 04, 2011 6:11 am

I would add for clarity that in my case the installer is picking up its OEM flavour at runtime, not while it's being compiled.
Nick

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: A last question about compiler variable & ProductCode

Postby giaviv » Mon Jul 04, 2011 10:56 am

Dear Nick,

You cannot edit the productcode at runtime because it is burned into the MSI tables. The PRODUCTCODE variable receives its value, but it is not editable (at least editing it does not affect the product code and might even cause issues).
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: A last question about compiler variable & ProductCode

Postby NickDay » Mon Jul 04, 2011 2:56 pm

Hi Aviv,
Woud Transform Instance possibly be a useful way to go?
Nick

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: A last question about compiler variable & ProductCode

Postby giaviv » Mon Jul 04, 2011 3:17 pm

Not really. What would help is editing the MSI tables after compilation with an MSI editor such as Orca.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: A last question about compiler variable & ProductCode

Postby NickDay » Tue Jul 05, 2011 6:10 am

Thanks for your replies, Aviv.

a) I have started using Transform Instance and so far I believe it is helping me achieve my aims of
i) installing multiple instances of my product tailored for different OEMs, alongside one another.
ii) multiple instances of a product installation for a particular OEM.
Did you have a reason for thinking that Transform Instance would not be useful to me?
Maybe you're thinking of my questions about the help link and so on, in which case I agree unfortunately. I'll have to see whether I can get away with using 'vanilla' ones.

NB what I am doing here is trying to develop a replacement for an InstallShield installer, and replicate similar features.

b) "What would help is editing the MSI tables after compilation with an MSI editor such as Orca."
Is that viable when using the new native engine please, and do you know whether I could automate it?

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: A last question about compiler variable & ProductCode

Postby giaviv » Tue Jul 05, 2011 8:33 am

I see - I thought you were referring to something else.
The Transform Instance command can indeed help you in this case but not with the other one.

The MSI tables are compiled into the built exe, and are not "visible" - you have to use an MSI editor to edit the content of the tables.
I am guessing that it can be automated, however it will require some effort.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: A last question about compiler variable & ProductCode

Postby NickDay » Tue Jul 05, 2011 12:52 pm

Thanks Aviv
Nick


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 39 guests