cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bluestar8783
Level 5

How to not show uninstall item in Add/Remove program on Control Panel?

Dear Sir:

I use the installshield 2008 to create one package to install.
My project uses InstallScript format to create.

Now I hope after installing my package, it shows nothing in
the Add/Remove program on Control Panel.

Please teach me how do i set or code to reach this goal?
Thanks.
Labels (1)
0 Kudos
(9) Replies
RobertDickau
Flexera Alumni

For an InstallScript project, perhaps look up the help topic "ADDREMOVE_SYSTEMCOMPONENT".
0 Kudos
bluestar8783
Level 5

RobertDickau wrote:
For an InstallScript project, perhaps look up the help topic "ADDREMOVE_SYSTEMCOMPONENT".


Dear Sir:

Very thanks for your information.
I found the ADDREMOVE_SYSTEMCOMPONENT and know it needs to
use "MaintenanceStart" to enable.

But i don't know how to code this function that i want. All uninstall
information created by installshield, and how to code it?Could you give
me a sample code?

Thanks for your teaching.
0 Kudos
thanh1968
Level 4

I did something similar and got the info from the online somewhere. Hope this will help you

function OnFirstUIAfter()
STRING szTitle, szMsg1, szMsg2, szOption1, szOption2, svResult, nCopyResult, szFrom, szTo, szUsersDir;
NUMBER bOpt1, bOpt2, bDoCopy, bDirOK, bError;
begin

Disable(STATUSEX);

bOpt1 = FALSE;
bOpt2 = FALSE;
szMsg1 = SdLoadString(IFX_SDFINISH_MSG1);
SdFinishEx(szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2);

HideApplicationToAddRemoveProgram();

end;

function HideApplicationToAddRemoveProgram()
STRING strRegKey, strStringName, strStringData;
NUMBER nStringFormat, nSize;
begin
// Activate Uninstallation information.
Enable(LOGGING);

// Select HKLM
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);

// Set up registry to hide application (SystemComponent == 1)
strRegKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + UNINSTALLKEY;
strStringName = "SystemComponent";
strStringData = "1"; // 1: Hide application
// 0: Dispaly application
nStringFormat = REGDB_NUMBER;
nSize = -1;
RegDBSetKeyValueEx (strRegKey, strStringName, nStringFormat, strStringData, nSize);
end;
0 Kudos
RobertDickau
Flexera Alumni

Perhaps you can just put ADDREMOVE_SYSTEMCOMPONENT=TRUE; somewhere early in your script?
0 Kudos
TheResearch
Level 6

Also, u can use this property 'ARPSYSTEMCOMPONENT'

http://msdn.microsoft.com/en-us/library/aa367750(VS.85).aspx
0 Kudos
RobertDickau
Flexera Alumni

Quite right, the ARPSYSTEMCOMPONENT property will work for MSI projects; for pure InstallScript, however, you'll want to use the similarly named ADDREMOVE_SYSTEMCOMPONENT variable.
0 Kudos
TheResearch
Level 6

O!!! Sorry, I missed the point that it is an Installscript Project.
0 Kudos
thanh1968
Level 4

^^^This is a better solution, I need to try this.
Thanks,
-Thanh
0 Kudos
bluestar8783
Level 5

RobertDickau wrote:
Perhaps you can just put ADDREMOVE_SYSTEMCOMPONENT=TRUE; somewhere early in your script?


Dear Robert:

I put the "ADDREMOVE_SYSTEMCOMPONENT=TRUE" in the
function:OnBegin() and work successfully.

Thanks for your great help.
0 Kudos