Hi there,
I have written a windows service using C#, but as the default case it does not interact with the desktop, that property which I need can be modified from the registry key , I had this code in the afterinstall for the Service installer:
private void serviceInstaller1_AfterInstall(object sender, InstallEventArgs e)
{
RegistryKey ckey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\nServiceName",true);
if (ckey != null)
{
if (ckey.GetValue("Type") != null)
{
ckey.SetValue("Type", ((int)ckey.GetValue("Type") | 256));
}
}
}
It is supposed to change the key value(type) to the value 272(which is the value of that property ), actually it does , and the property of interact with the desktop is activated, but the application never show up on the desktop it just run the process (I saw it in the task manager) :|
if anybody hopefully has an answer on what should else I do, please your help is needed!