Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
hi All,

i have to write a custom installer using C#.

is it possible to check the codec software will be present in the registry. i.e
while doing installation in the client PC, Installer should be check the codec software is already installed for windows media player. if it's not installed in the registry then the installer should automatically install the codec software in the client PC

kindly anyone guide me to write a custom installer for the above situation...

Thanks
Vijay r
Posted

Checking a codec means checking a registry value, isn't it?

Here is a link how to write read registry Read, write and delete from registry with C#[^]

Search google, you may millions.

Now the question is where to use these codes. You can use Custom Actions Editor in your setup project and call these codes in the install or commit events. Install event is better.

These events are in a installer class that you are going to use with the custom action editor. If the codec is not there then you can raise the rollback event.

Now google Custom actions Deployment c#. You might get well detailed microsoft documentations.

Good luck
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 11-Mar-11 21:36pm    
Not bad to get started, my 5,
--SA
vijayr 15-Mar-11 7:07am    
rollback event is not firing
You can use vb script to check the instance of system registry. and add the vb script in your setup file . Refer to inno setup website
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900