Skip to content
⌘ NSIS Forum Archive

Suggestion for UserInfo.nsi

3 posts

Lilla#

Suggestion for UserInfo.nsi

With the latest CVS (downloaded a few hours ago)
When running UserInfo.nsi (.exe),
under Win98SE, I get the Admin message.
This is good, however, it contradicts what is stated
in the comments/message of label "Win9x:" (see below)

Excerpts from UserInfo.nsi

StrCmp $R2 "Admin" 0 Continue
MessageBox MB_OK 'User "$R1" is in the Administrators group'

... clip...

Win9x:
; This one means you don't need to care about admin or
; not admin because Windows 9x doesn't either
MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"


Observation:
** Win98SE does indeed run this DLL, at least my install does.
** My install includes a number of updates, not sure if this is why.

In any event, you might want to correct the comment/message.

Lilla
kichik#
I know about this. For some weird reason the functions UserInfo.dll looks are for are there on Windows 98 too but just don't work. So UserInfo.dll, knowing that admin isn't required on Windows 98 anyway, returns admin anyway. You should still check for an empty string because these functions may not be present on Windows 95.