Solved

Running program as administrator

Posted on 2002-05-20
3
134 Views
Last Modified: 2010-05-02
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?
0
Comment
Question by:mollercw
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 7021018
0
 

Author Comment

by:mollercw
ID: 7023398
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
 
LVL 43

Expert Comment

by:TimCottee
ID: 7023434
Probably the best decision, though of course this sort of thing should be much easier in vb.net!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now