|
#1
|
||||
|
||||
|
GetUserInfo reporting false when Administrator logged on
Can't quite get my head around this one.
Code:
user_info = System.GetUserInfo();
if (not user_info.IsAdmin) then
Dialog.Message("Warning", "You are not logged in as an Administrator. The installation will now terminate");
Application.Exit(0);
end
My test system here works fine and always reports true and (in theory) the remote server (which is on a ship) was built identically. This is not the first time I have seen this myself and in other SUFx installers I have removed this code assuming the Captain of the vessel would follow my instructions to log on as the Admin-equivalent. As this is on the server only that ID is allowed to log on so he can't have got it wrong. Servers on other ships do not exhibit any problems and installer runs to completion. Anyone seen this before and if so any solution? Thanks - John |
|
#2
|
||||
|
||||
|
Have you tried using the (undocumented) api call IsNTAdmin()?
while I have not seen this happen, perhaps it has something to do with the admin being actually disabled. If so; this is a bug... |
|
#3
|
||||
|
||||
So something else is going on. Any chance you could get more information on the config of this system? |
|
#4
|
||||
|
||||
|
btw: call for the api is:
Code:
local nResult = DLL.CallFunction(_SystemFolder.."\\advpack.dll", "IsNTAdmin", "0,0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL); tested on 2003 x86 and 2008 x64 -josh |
|
#5
|
||||
|
||||
|
Josh
Thanks for this. I had forgotten about the API which I suspect will work. I can send out a simple small file for the ship to test to verify this works before I update the main installer and send via CDl. At $12 a MB it gets rather expensive to send over a satellite link! Not sure why does not work on this particular server unless GetUserInfo is interrogating a strange part of the registry rather than Active Directory. On all the servers 'Administrator' is disabled. Rgds John |
|
#6
|
||||
|
||||
|
It is indeed curious. I did not test with AD here; just with the administrator user disabled.
It could be that it's testing for MACHINE administrator, not a DOMAIN administrator.... Just a guess tho. There's at leaset one other api we can try. faling that -- I have some really bad / cludgy ideas... Is this a cruise or research ship? (I'm guessing it's not military at $12/mb) A small way would be to AutoIt to create a small sample (about 300K) for testing... |
|
#7
|
||||
|
||||
|
Josh
I'm building another version as I forgot I have patching software (not IR) from way back when installed on the systems so the increment should be very small. Will see what that does. They are tankers by the way.. Thanks for the heads up. Rgds John |
|
#8
|
||||
|
||||
|
dont' want to hijack this thread -- but I would be interested to know what "old patching" software you use? I've found some still valuable for size wise (no scripting or ui's so they are really small) and what you're doing for the tankers? PM if you have you have time -- otherwise, don't worry about.
---- Do let us know what you find with the api call. |
|
#9
|
||||
|
||||
|
Josh
I still use RTPATCH from when I last purchased it in 2001. Works fine at the moment (on 32 bit of course). Allows me to leave the runtime on the ship and just send out the small RTP file. If I am patching on a non-urgent basis & have time to send out via CD (anything over about 2-3MB), then I use other tools that are more end-user friendly (to the seafarers) such as IR products. As for NTAdmin detection I did try your API call but it returned a message something like ' Not a LAN Administrator' which not in my code so must be the API. That was me logged on as Administrator. Need to spend some more time on this next week as my power keeps going on/off as they dig up the road outside for some unknown reason. Thanks John |
|
#10
|
||||
|
||||
|
I used to use a patch program from "Noteworthy" (odd since they produce music, but they had a nice patch program). produced small patches for simple things... luckily for me -- I'm not subject to 12/meg downloads!
Now, as for your API issue -- I'll try to set up a domain here in the next few days, but I'm betting they have disabled the local machine admin; and the user is part of the domain admin; and the api is dealing with local machine admin rights. if you want some help on this -- feel free to PM me for my email/IM info; this is something I'd like to solve too. |
|
#11
|
||||
|
||||
|
Try as I might; I cannot get a "Not a LAN Administrator" message from the API call itself. (indeed, I cannot get it to display any message at all).
Indeed a puzzle... |
![]() |
| Tags |
| adminisrator, getuserinfo, suf8 |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 08:49 AM.









Linear Mode
