March 29, 2024, 08:52:03 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Registering a program in Add / Remove programs

Started by Andy, April 22, 2015, 07:37:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Hi,

I just wanted to show everyone how to register a program in Add / Remove // Programs and Features (Windows Control Panel).

See attached:

I know many people use Installers / Uninstallers, but for me I wanted to add my Uninstall program myself.

Points to note:

result is just an int - 0 = OK, 1 = Error - can't set it

SetupAutoScanEnhanced.exe - act as both the initial setup program, but also has an option for uninstalling - hence this is my uninstall program.

vno$ - is simply a string with the program version - in my case "2.02"

cpath - is the path to the SetupAutoScanEnhanced.exe program - in my case it's
"C:\\Program Files\\AutoScan Enhanced"

"EstimatedSize", 24576 - the size of all my AutoScan programs on disk in K (24576 / 1024 = 24MB)

This example is for the current user only - if you want it for all users change all references of:

HKEY_CURRENT_USER\

to

HKEY_LOCAL_MACHINE\

Hope this is of interest to someone.

The attached program should add a registry key with all the uninstall details - you should then see it listed in Add / Remove programs // Programs and Features.


Thanks,
Andy.

:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.