Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 21st September 2002, 13:57   #1
rpetges
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
rpetges is offline   Reply With Quote
Old 21st September 2002, 14:04   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Old 21st September 2002, 14:11   #3
rpetges
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
rpetges is offline   Reply With Quote
Old 21st September 2002, 14:50   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Old 21st September 2002, 15:22   #5
brainsucker
Senior Member
 
brainsucker's Avatar
 
Join Date: Sep 2002
Location: Minsk, Belarus
Posts: 190
Send a message via ICQ to brainsucker
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 :)?
Attached Files
File Type: zip isadmindll.zip (1.5 KB, 136 views)
brainsucker is offline   Reply With Quote
Old 21st September 2002, 15:28   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Old 21st September 2002, 15:29   #7
rpetges
Member
 
Join Date: Sep 2002
Location: Luxembourg
Posts: 81
Many thanks for your help !

Romain
rpetges is offline   Reply With Quote
Old 21st September 2002, 21:57   #8
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Is there also a DLL which can check for Power Users?
Joost Verburg is offline   Reply With Quote
Old 22nd September 2002, 08:28   #9
rpetges
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
rpetges is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump