Running as Administrator
843811Dec 3 2004 — edited Dec 3 2004I've developed POS system that uses a library (using JNI) to change the system time. When it connects to the Server, its time is updated.
It works fine when I run it as administrator or other user with privileges to change the system time. But I really need to change the system time as a restricted user (the POS is accessed by any person, so the guest user should be restricted). It is not possible to give the password everytime (since the admin is not there).
I would like to run this application as administrator, so I tried a .reg file with the following content:
-----------------------BEGIN OF FILE-----------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\javaw.exe]
@="javaw"
"AppID"="{B878D91F-627B-4789-9F73-5CB433BE18AA}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{B878D91F-627B-4789-9F73-5CB433BE18AA}]
@="javaw"
"Run As"="Administrador"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\java.exe]
@="java"
"AppID"="{0F2240C0-DA07-4aaf-90F0-B1C69D4A8E1B}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{0F2240C0-DA07-4aaf-90F0-B1C69D4A8E1B}]
@="java"
"Run As"="Administrador"
------------------------END OF FILE------------------------
But it didn't work (the GUID was generated using GUIDgen.exe - but I'm not sure if I did it correctly).
Does any one knows how to solve this problem? A solution including a .reg file is well appreciated.