Indigo Rose Software

Go Back   Indigo Rose Software Forums > Setup Factory 8.0 > Setup Factory 8.0 Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 2 Weeks Ago
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
On one Windows 2003 server this fails as user_info.IsAdmin is reporting false whereas the server is logged on as Administrator or strictly speaking a user who is member of Adminstrators group. The actual Administrator account is disabled so cannot be tested in that mode.

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
Reply With Quote
  #2  
Old 2 Weeks Ago
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
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...
__________________
Reply With Quote
  #3  
Old 2 Weeks Ago
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
  1. I fired up a win2003 test box
  2. created a new user
  3. added the new user to administrator group
  4. disabled administrator
  5. logged in as new user
SUF reported the user was an administrator

So something else is going on.

Any chance you could get more information on the config of this system?
__________________
Reply With Quote
  #4  
Old 2 Weeks Ago
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
btw: call for the api is:

Code:
local nResult = DLL.CallFunction(_SystemFolder.."\\advpack.dll", "IsNTAdmin", "0,0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
if nResult is zero; then the user is NOT an admin.
tested on 2003 x86 and 2008 x64

-josh
__________________
Reply With Quote
  #5  
Old 2 Weeks Ago
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
  #6  
Old 2 Weeks Ago
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
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...
__________________
Reply With Quote
  #7  
Old 2 Weeks Ago
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
  #8  
Old 2 Weeks Ago
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
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.
__________________
Reply With Quote
  #9  
Old 2 Weeks Ago
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
  #10  
Old 2 Weeks Ago
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
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.
__________________
Reply With Quote
  #11  
Old 2 Weeks Ago
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
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...
__________________
Reply With Quote
Reply

Tags
adminisrator, getuserinfo, suf8

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software