Change Product Code at compile time

Got a problem you cannot solve? Try here.
IntelliServ
Posts: 15
Joined: Tue Nov 21, 2006 5:16 pm

Change Product Code at compile time

Postby IntelliServ » Fri Mar 23, 2007 11:47 am

I'm trying to change the product code at compile time but having a little trouble. I first tried passing a compiler variable PRODUCTCODE={blah} (with correct replacement of the blah). That had no effect. So I passed the same compiler variable and made one of the first lines be

Code: Select all

Set Variable PRODUCTCODE to #PRODUCTCODE#
which effectively changes the product code. However, the NEEDSUPGRADE variable is set as if the previous product code was used.

Is there an easy way to change the product code at compile time or very early in run time but before other variables (like NEEDSUPGRADE) get set?

IntelliServ
Posts: 15
Joined: Tue Nov 21, 2006 5:16 pm

Postby IntelliServ » Tue Mar 27, 2007 4:02 pm

In case anyone was wondering, I did figure out my problem. Go to the visual screen -> Application Information -> Project Properties and set the product code field to "#USEPRODUCTCODE#" (without quotes). A tool tip bubble might complain at you but you can ignore it. Then set a compiler variable named USEPRODUCTCODE to the GUID you want to use. Don't do anything in the code section.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 64 guests