Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Running program as administrator

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

792 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