Running program as administrator

Hi

I have a program that checks your HDD's SMART values. The first thing it does, is call CreateFile to get a handle to send along to DeviceIOControl. The program works 100% for administrators, but I need it to work for users too.

I have one of two options, either find another way of getting the handle, or install my program as a service on the machine (it will run continuously in the background anyway) and give it admin rights.

Frankly, I prefer the service option. Any ideas how?
mollercwAsked:
Who is Participating?
 
mollercwAuthor Commented:
Good answer, but unfortunately there's only so many workarounds you can implement before you have to change languages. So I'll be redoing the whole thing in VC++.

Thanks for the info.
0
 
TimCotteeCommented:
Probably the best decision, though of course this sort of thing should be much easier in vb.net!
0
All Courses

From novice to tech pro — start learning today.