0
Reply

Exception during installutil on vista.

shilpa bharkhada

shilpa bharkhada

Sep 7 2007 12:47 AM
5k

Hi,

We are implementing Proxy monitoring Tool in c#. we have written the code like this...

 public class PMTServiceInstaller : Installer

 {

 public PMTServiceInstaller()

 {

 ServiceProcessInstaller serviceProcessInstaller = new

 ServiceProcessInstaller();

 ServiceInstaller serviceInstaller = new ServiceInstaller();

 

 //# Service Account Information

 serviceProcessInstaller.Account = ServiceAccount.LocalSystem;

 serviceProcessInstaller.Username = null;

 serviceProcessInstaller.Password = null;

 

 //# Service Information

 serviceInstaller.DisplayName = "Proxy Monitoring Tool";

 serviceInstaller.StartType = ServiceStartMode.Automatic;

 

 // This must be identical to the WindowsService.ServiceBase

 name

 // set in the constructor of WindowsService.cs

 serviceInstaller.ServiceName = "ProxyMonitoringTool";

 serviceInstaller.Description = "Service for Proxy Monitoring

 Tool";

 

 this.Installers.Add(serviceProcessInstaller);

 this.Installers.Add(serviceInstaller);

 }

 }

 }

 On XP it is working fine. But on vista while installing I am getting exception System.Security.SecurityException:Requsted registry access is not allowed.  I  have changed permission in regedit also. But still  it is not working. On vista what extra I will have to do? Further I am getting exception System.ArgumentException:the savedstate dictionary does not contain the expected value & might have been  corrupted.

Furthermore i have tried both approaches given on the link http://support.microsoft.com/?id=329291

One solution i got is run command prompt as a administrator.This is working fine on vista,but is there any other approach?

 Any help regarding this will be appreciated.

 Thanks in advance.

 Thanks & Regards,

 Shilpa