hi !
i have an installer that works fine.
now i had included two things :
a copy routine for fonts and a copy routine for a video codec
the problem is : under win2k / xp a normal user cant install a videocodec or font
thats why an admin should be used to run
is it possible to determine if the curent user has admin privilegues ???
maybe a registry flag ?
or is this impossible at this time ? then maybe i'll ask justin to implement this.
small prob / question
5 posts
This topic has rased a lot of questions in the past. Search the Forum for it. All I know, that you should try to write to HKLM (local machine) and if this succeeds, the user has administrator access...
Is this sufficient?
(see http://forums.winamp.com/showthread....ighlight=admin)
Good luck,
-Hendri.
Is this sufficient?
(see http://forums.winamp.com/showthread....ighlight=admin)
Good luck,
-Hendri.
Make root environement test
Hi,
I am checking out, if the user is able to write to the root enviroment string. Then the user has the right to act as administrator(only for Winnt4/2000/XP).
;$R1=admin (0=no,1=yes)
StrCpy $R1 0
Strcpy $R3 "SYSTEM\ControlSet001\Control\Session Manager\Environment\envtest"
WriteRegStr HKLM $R3 "" "test"
IfErrors no_rootenv
ReadRegStr $R2 HKLM $R3 ""
StrCmp $R2 "" no_rootenv
DeleteRegKey HKLM $R3
ReadRegStr $R2 HKLM $R3 ""
StrCmp $R2 "" 0 no_rootenv
rootenv:
Strcpy $R1 1
no_rootenv:
ClearErrors
Hi,
I am checking out, if the user is able to write to the root enviroment string. Then the user has the right to act as administrator(only for Winnt4/2000/XP).
;$R1=admin (0=no,1=yes)
StrCpy $R1 0
Strcpy $R3 "SYSTEM\ControlSet001\Control\Session Manager\Environment\envtest"
WriteRegStr HKLM $R3 "" "test"
IfErrors no_rootenv
ReadRegStr $R2 HKLM $R3 ""
StrCmp $R2 "" no_rootenv
DeleteRegKey HKLM $R3
ReadRegStr $R2 HKLM $R3 ""
StrCmp $R2 "" 0 no_rootenv
rootenv:
Strcpy $R1 1
no_rootenv:
ClearErrors
Re: Make root environement test
Originally posted by superrockDo you need ClearErrors there? IfErrors automatically clears the error flag (found that out a week or so ago when I thought it was still set until you clear it) so I don't think you need the ClearErrors if you are just trying to clear the error that was previously set before the jump.
Hi,
I am checking out, if the user is able to write to the root enviroment string. Then the user has the right to act as administrator(only for Winnt4/2000/XP).
;$R1=admin (0=no,1=yes)
StrCpy $R1 0
Strcpy $R3 "SYSTEM\ControlSet001\Control\Session Manager\Environment\envtest"
WriteRegStr HKLM $R3 "" "test"
IfErrors no_rootenv
ReadRegStr $R2 HKLM $R3 ""
StrCmp $R2 "" no_rootenv
DeleteRegKey HKLM $R3
ReadRegStr $R2 HKLM $R3 ""
StrCmp $R2 "" 0 no_rootenv
rootenv:
Strcpy $R1 1
no_rootenv:
ClearErrors