473,408 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How do I make a program that can only be run by an administrator

I want to produce a program that can only be run by a user with administrator
privileges (ie a member of the BUILTINS/Adminstrators group - I think.
Correct me if I'm getting my terminology wrong). Can someone start me in the
right direction. I'm using VS2005 (just upgraded from 2003)
--
Dave
Jul 3 '06 #1
1 1581
Dave wrote:
I want to produce a program that can only be run by a user with
administrator privileges (ie a member of the BUILTINS/Adminstrators group
- I think. Correct me if I'm getting my terminology wrong). Can someone
start me in the right direction. I'm using VS2005 (just upgraded from
2003)
Hi Dave,

To accomplish this without using embedded code, you can set the security
permissions on the application to only allow Administrators to execute the
application... then it's Windows itself which will Allow/Deny execution of
your program. Otherwise, you'll need to write code in your entry point to
test group membership, and either continue executing, or stop execution.
IMHO, the former is significantly better than the latter, since if you are
writing your application in .NET, what's to stop someone using Reflection
to load your assembly, and accessing parts of the code after your tests...
or even worse, simply disassembling your assembly, taking out the admin
verification code, and reassembling it.

--
Hope this helps,
Tom Spink
Jul 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brian Worth | last post by:
I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0 was able to shut down or restart the (windows XP) machine using a series of API calls. (Getlasterror, GetCurrentProcess,...
4
by: Philip Wagenaar | last post by:
I have a program that has to run under the administrator account. But the use that will start the program has it's own (limited) account. How can I run a program under administrator? I'd like...
1
by: Chris Wheeler | last post by:
I'm having what seems to be a rather strange error. The VB program interacts with an Access Database with ODBC connection to a DB2 database, but doesn't really do anything too tricky (select...
2
by: Cleyton | last post by:
Hello! Someone knows how I can solve it: I've installed my program in administrator account for all users. But i've tried to run in guest account, my program returned fatal error, and it didn't...
8
by: Dave | last post by:
I want to create a program that can only be run by a user with administrator privileges (ie in the BUILTIN/Administrators group - I think. Correct me if I'm wrong, I'm a bit hazy on users and...
0
by: dwalker0229 | last post by:
I have built a program that uses ultr@vnc for my work. how can i have the program ask for credentials (either run as local user or as "Administrator") but not "require" administrator logon? I want my...
1
by: grabro | last post by:
Having just upgraded to from Suse 10.0 to 10.1 mysql-administrator will not work. When I try to acccess it I get the following message. linux:/home/grabro # mysql-administrator...
0
by: yxq | last post by:
I am building the program to set Registry on Vista using vb2005, but how to double-click my .exe file to open the "Allow/Deny" dialog(run as an administrator)? thank you.
1
dima69
by: dima69 | last post by:
Hi everybody. I develop a commercial MSAccess application. Until now, the default folder for my installation was "Program Files" - because this is the "conventional" way. However, I discovered that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.