MoRon
13th January 2005 16:56 UTC
System clock and current user info
Hello,
I'm a newbie to the forum and NSIS program. I'm trying to use NSIS for work issues. I was wondering if it is possible to check or verify that the current user isn't logged in as an administrator before an install is ran. If the person is logged in as admin. to abort installation. Also, is it possible to hide the clock in the taskbar using NSIS? I tried creating a Reg key "HideClock", but I can't get it to work. I search all over the internet and checked through the examples, and I'm not having any luck with either! Any suggestions? Thanks in advance!
kichik
13th January 2005 20:11 UTC
Use the UserInfo plug-in to get the user's account type. There's an example in Contrib\UserInfo\UserInfo.nsi. As for the registry key, did you make sure it's created?
MoRon
13th January 2005 20:59 UTC
Thanks for the info kichik! I never looked in the Contrib folder. This will work out great! And yes the registry key is created and the value doesn't change after restart, but the clock remains in the taskbar. The reg. that I used was HKEY_CURRENT_USER\Software\Microsoft\Windows\Currentversion\Policies\Explorer "HideClock" dword 0x00000001.