Add description to micasad service for windows

This commit is contained in:
Jim Norman 2006-01-22 04:19:37 +00:00
parent 9a69609487
commit c422464e56
2 changed files with 39 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Jan 21 21:25:34 MST 2006 - jnorman@novell.com
- Bug 143837. Add description to micasad service for windows
-------------------------------------------------------------------
Fri Jan 20 13:20:34 MST 2006 - jnorman@novell.com

View File

@ -44,6 +44,8 @@ namespace sscs.init
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private static string SERVICE_DESCRIPTION = "Novell Identity Store is used by CASA (Common Authentication Service Adapter) "
+ "to encypt and store credentials entered by users. These credentials can be used to authenticate to additional network services";
public ProjectInstaller()
{
@ -111,5 +113,36 @@ namespace sscs.init
{
}
public override void Install(IDictionary stateServer)
{
Microsoft.Win32.RegistryKey system,
currentControlSet,
services,
service,
config;
try
{
//Let the project installer do its job
base.Install(stateServer);
//Open the HKEY_LOCAL_MACHINE\SYSTEM key
system = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("System");
//Open CurrentControlSet
currentControlSet = system.OpenSubKey("CurrentControlSet");
//Go to the services key
services = currentControlSet.OpenSubKey("Services");
//Open the key for your service, and allow writing
service = services.OpenSubKey(this.serviceInstaller1.ServiceName, true);
//Add service's description as a REG_SZ value named "Description"
service.SetValue("Description", SERVICE_DESCRIPTION);
}
catch(Exception e)
{
Console.WriteLine("An exception was thrown during service installation:\n" + e.ToString());
}
}
}
}
}