cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nidheesh_kuvil
Level 4

How to set the product information stored in Control Panel Dynamically

Hi,

How to set the product information stored in Control Panel Dynamically.

Eg : My application name in PROJECT ASSISTANT Window is "ABC", Company Name is "ABC" and Version is "1.0.50". After installing this i got an entry in Control Panel -->Add Or Remove Programs with name "ABC". But as per the requirement i need to change the value in Control panel dynamically based on some conditions
like :-
if productkey == 1 then
"ABC"
else if productkey == 1 then
"DEF"
else
"GHIJ"
endig

Please suggest me solution.
URGENT
Labels (1)
0 Kudos
(4) Replies
thananjeyan
Level 3

Hi

You can change the registry entry for your product
By setting the display name for your product

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\your_productname]

"DisplayName"="Your Product Name"

Thanks
0 Kudos
nidheesh_kuvil
Level 4

thananjeyan wrote:
Hi

You can change the registry entry for your product
By setting the display name for your product

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\your_productname]

"DisplayName"="Your Product Name"

Thanks



Hi,

Thanks for your support. i tried the way which you told. Its working for all other than "DisplayName". I can change the Version, support info etc.. but if i change the DisplayName its not working.

Please help

Regrads,
Nidheesh
0 Kudos
thananjeyan
Level 3

Hi

Please try this code

UNINSTALL_DISPLAYNAME = "Your_Product name";
(Or)
RegDBSetItem ( nItem, szValue );


Thanks
Thananjeyan
0 Kudos
Alex1969
Level 4

Dear nidheesh,

nidheesh.kuvil wrote:
Hi,

Thanks for your support. i tried the way which you told. Its working for all other than "DisplayName". I can change the Version, support info etc.. but if i change the DisplayName its not working.



I'm using the following code to set some text to the control panel's information pane:


// Set sKey to be the uninstall key for this product
sKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + PRODUCT_GUID;
nDefRoot = RegDBGetDefaultRoot();
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );

// Set the InstallLocation value in the uninstall key.
RegDBSetKeyValueEx( sKey, "InstallLocation" , REGDB_STRING, TARGETDIR, -1 );
// Icon File für Display unter W2K und XP setzen (ControlPanel->AddRemove Applikations)
RegDBSetKeyValueEx( sKey, "DisplayIcon" , REGDB_STRING, TARGETDIR^BS_ICO_FILE, -1 );
//Set the Support URL
RegDBSetKeyValueEx( sKey, "HelpLink" , REGDB_STRING_EXPAND, COMPANY_URL, -1 );
//Set the Support Email
RegDBSetKeyValueEx( sKey, "Contact" , REGDB_STRING_EXPAND, COMPANY_EMAIL, -1 );

RegDBSetDefaultRoot( nDefRoot );


HTH Alex
0 Kudos