Click here to Skip to main content
11,798,866 members (72,199 online)
Rate this: bad
Please Sign up or sign in to vote.
i need to create registry key while installing my setup file. what i have to do....
Actually i created the installer class with the below code.

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;

namespace StockManagement
    public partial class Installer1 : Installer
        public Installer1()
        public override void Install(System.Collections.IDictionary stateSaver)
            int count = 10;
            Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@"SOFTWARE\WIN32");
            key.SetValue("Sys", count, Microsoft.Win32.RegistryValueKind.String);

then i build it...
and i add it in my setup file under
custom actions-->install\

after build my setup file
when i install in my system it creates the registry key...
and works normally..
but when i install in other systems during installation.. i got the error

ERROR:1001 Unable to get the installer types in the c:\program files\stock management.exe assembly.--> Unable to load one are more of the requested types: Retrieve the loader exception property for more information..

how to solve this error...
Posted 3-Feb-12 17:41pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Read this forum post.
Maybe its the same issue!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You need to change the installer .NET Framework Launch Condition property which is by default 3.5 . You have to change it back to 2.0

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

  Print Answers RSS
0 CPallini 505
1 OriginalGriff 503
2 Richard MacCutchan 321
3 Maciej Los 245
4 phil.o 244
0 OriginalGriff 2,270
1 Maciej Los 1,810
2 KrunalRohit 1,496
3 CPallini 1,425
4 Richard MacCutchan 1,109

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 5 Feb 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100