Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
windows service help
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
prabhat khadka
16y
2k
1
Reply
I have developed a windows service.To run my service I must check the box containing "Allow System to interact with Desktop".Is it possible to check that box through programming.
Well I got this code..
RegistryKey ckey = Registry.LocalMachine.CreateSubKey(@"SYSTEM\CurrentControlSet\Services\"+ServiceName);
if (ckey != null)
if (ckey.GetValue("Type") != null)
ckey.SetValue("Type", ((int)ckey.GetValue("Type")|256));
The box is checked but not doing the desired task.But if I manually check that box again it does.And,Where should I put above method?
Thank u.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
'System.Web.HttpRequest' does not contain a definition for 'Request'
NP71 Source Code