|
|
#1 |
|
Member
Join Date: Sep 2002
Location: Luxembourg
Posts: 81
|
Check for administrator privileges
Hi all,
I'm currently running NSIS 2.0a7 and need to restrict the installation of a software to users that have Administrator rights on their WinNT/2000/XP machine. How can I check if a user has these rights and block the installation for other users ? Thank you for your help Romain |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Please read the FAQ.
How can I make sure the user installing my software has admin rights? Use the IsAdmin DLL to find out. (there is a link in the faq too) NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Member
Join Date: Sep 2002
Location: Luxembourg
Posts: 81
|
I saw the section in the FAQ but I thought there was an easier way to check this out, maybe a built-in variable in NSIS.
On the other hand, where can I download the DLL as I didn't own a C/C++ compiler :-( Romain |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
There is a compiled veresion in the ZIP file.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Senior Member
|
IsAdmin
Sorry kichik, but it is not :)
Here it is... By the way: there is a big problem opening NSIS project/workspace files with MSVC++ 7.0. Is says something like: "Cannot load project file due to corrupt project file". Somebody knows the solution (I'm not ready to create new VC7 project for every NSIS component yet :)? |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
That's weird... I was sure it was there before
![]() Well, anyway, thanks for attaching it brainsucker. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Member
Join Date: Sep 2002
Location: Luxembourg
Posts: 81
|
Many thanks for your help !
Romain |
|
|
|
|
|
#8 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Is there also a DLL which can check for Power Users?
|
|
|
|
|
|
#9 |
|
Member
Join Date: Sep 2002
Location: Luxembourg
Posts: 81
|
Maybe it is an idea to include a single function into v2.0a8 that returns the current privileges for the logged user.
Example: function GetPriviliges that returns User, PowerUser, Guest, Administrator... or only a well defined integer number. That's the only thing I'm missing in NSIS. What do you think about it ? Romain |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|