Solved

Running program as administrator

Posted on 2002-05-20
3
136 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

832 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