| | |
windows service interact with the desktop
Please support our C# advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2007
Posts: 84
Reputation:
Solved Threads: 0
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:
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!
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:
C# Syntax (Toggle Plain Text)
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!
there's always something to learn
![]() |
Similar Threads
- Connecting 2 Monitors to my Computer - Help Please (Monitors, Displays and Video Cards)
- Auto Update and manual update fails on XP SP2 Home Edition (Windows NT / 2000 / XP)
- Schedule Task Problem ??? (Windows NT / 2000 / XP)
- This is a wierd one! (Windows NT / 2000 / XP)
- Need help making a program (C++)
- Svchost.exe Error (Windows NT / 2000 / XP)
- Several problems with applications and IE (Viruses, Spyware and other Nasties)
- Editing the desktop envrionment using VB.NET (VB.NET)
- Windows pop-up won't go away (Viruses, Spyware and other Nasties)
Other Threads in the C# Forum
- Previous Thread: Split text into substrings seperated more than one character
- Next Thread: need help regarding webservice and pocket pc application
Views: 3850 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access algorithm array barchart bitmap box button buttons c# chat check checkbox class client code color combobox control conversion csharp custom database datagridview dataset datetime degrees draganddrop drawing encryption enum excel file files form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





