473,473 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Setup Project - Test If User Is An Administrator?

Is there a good way to test if a user is an administrator at the start
of a setup, and abort (with an error message) if they are not?
Jun 27 '08 #1
1 996
there are several ways this is just one

If My.User.IsAuthenticated ANDALSO My.User.IsInRole("Administrators") Then
'Yes he / she is administrator
End If

I have seen code that just tryed to write at certain locations to see if
the user had apropriate rights on the system
low level but it is also a way of ensuring that your program can get
installed on the target system, from a certain point of view
it isn`t even as bad as it sounds :-)

hth

Michel posseth

"Alan Cohen" <amc79@cornell_no_spam_please.eduschreef in bericht
news:uS**************@TK2MSFTNGP06.phx.gbl...
Is there a good way to test if a user is an administrator at the start of
a setup, and abort (with an error message) if they are not?

Jun 28 '08 #2

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

Similar topics

2
by: Ryan McCormack | last post by:
I have a setup project to deploy our software -- but I have a problem. I want the installation to be system wide, but I also want all users to have rwx permissions to the installation directory...
0
by: Jack | last post by:
I used the setup project to create an msi setup file for a VS.NET application. It generally works, except on one workstation that is generating the following error message: "The advertised...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
4
by: Husam | last post by:
Hi Every Body: How can I add the .Net Framework to my setup project? any help will be appreciated. Regard's Husam
2
by: A.Carter | last post by:
I am developing a windows application with Visual Studio 2003 using C#. The application is complete so naturally I went to create a setup package. I added a setup project to the solution and I went...
7
by: sunil | last post by:
Hi, I have created a setup project which installs a Network service. In the installer, I had to set some security permissions so that Network service can access my installation folder. Since, only...
5
by: Nelluru | last post by:
Hi, I am using Visual Studio 2005. I am trying to create an msi package for my application using Setup and Deployment project. I am able to create msi package and it is installing properly....
1
by: Claire | last post by:
Ive written a small string resource building utility that I send out to our translators. I have a setup project for each language we support, which picks out a group of 12 english resx files plus...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.