Page 1 of 1 1
Topic Options
#156128 - 2006-01-27 05:05 PM IsLocalAccount function?
gforgeot Offline
Fresh Scripter

Registered: 2005-12-01
Posts: 5
Hi,

I'm looking for a simple function to check if the logged account is a local one or a domain one.
Can you help me?

Thanks

Top
#156129 - 2006-01-27 05:08 PM Re: IsLocalAccount function?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Hmmm... need to wonder how your user is running the script. If it is a network logon script, it should not run for a local logon.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156130 - 2006-01-27 05:11 PM Re: IsLocalAccount function?
gforgeot Offline
Fresh Scripter

Registered: 2005-12-01
Posts: 5
It is on a network drive but some IT need to test it with some local accounts (not always the same it would have been so simple ) mapping handly the drive.
Top
#156131 - 2006-01-27 05:13 PM Re: IsLocalAccount function?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If it is a network logon and local users are running it *manually*, the @LogonMode macro will tell.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156132 - 2006-01-27 05:19 PM Re: IsLocalAccount function?
gforgeot Offline
Fresh Scripter

Registered: 2005-12-01
Posts: 5
Domain users are also running it manualy. It is a script to genrate conf file before launching the application.
Top
#156133 - 2006-01-27 05:31 PM Re: IsLocalAccount function?
gforgeot Offline
Fresh Scripter

Registered: 2005-12-01
Posts: 5
I think that with the @LDOMAIN and @HOSTNAME I might be abble to do something quite simple
Top
#156134 - 2006-01-27 05:41 PM Re: IsLocalAccount function?
gforgeot Offline
Fresh Scripter

Registered: 2005-12-01
Posts: 5
Something like that


Function IsLocalAccount
DIM $tmp
$tmp=iif(@LDOMAIN=Left(@HOSTNAME,Instr(@HOSTNAME,".")-1),True,False)
$IsLocalAccount=$tmp
EndFunction

Top
#156135 - 2006-01-27 06:16 PM Re: IsLocalAccount function?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I was thinking along the lines of checking the cache in:
HKEY_CURRENT_USER\Software\KiXtart\TokenCache
This would require that you invoke InGroup() to populate the cache.

But if what you have works, then go for it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box
2024-03-08 [mole] Thanks for getting the posts back again.
2024-04-17 [MarineV] db errors
2024-04-18 [MarineV] will the db errors get fixed????
2024-04-26 [Tonny] database error, please!
2024-05-09 [NTDOC] I'm not seeing any errors
2024-05-31 [chojin] DB is down again \:\(
2024-06-04 [selsner] Still no access, please help!
2024-06-07 [mole] Looks like DB is back again. Thanks.
2024-06-17 [It_took_my_meds] We encountered a problem. The reason reported was Database error only visible to forum administrators Please click back to return to the previous page.
2024-07-04 [Armin73] There is still a database error 🤷‍♂️
2024-07-09 [0neZero] There is still a database error 🤷‍♂️
2024-07-10 [Allen] DB working a few times in between the messages above. Working again as of 7/10. Thanks Doc
2024-08-31 [NetGnostic] Bummer, the Database error is back.
2024-09-04 [NTDOC] Fourms are back up without error for the moment
2024-10-02 [Arend_] Wll still have database errors ;-)
2024-10-03 [Allen] Thanks to Doc... it's back.
2024-12-09 [chojin] could we move kixtart to a new place in order to keep it living ? maybe create a github page and a subreddit?
2024-12-10 [Allen] do know about moving it, but I know Doc is aware of the DB issue. Should be back online soon.
2024-12-10 [Allen] don't know...
2025-02-09 [Comet] Greetings. I installed KiX on my new Windows 11 computer, and joined this foum. Hello World!
2025-02-10 [Allen] Welcome
2025-02-15 [Glenn Barnas] Discord? Reddit? New URL?
2025-03-07 [Comet] UBB Error We encountered a problem. The reason reported was Database error only visible to forum administrators
2025-06-30 [mole] Thanks for getting this working again.
2025-07-28 [mole] UBB Error We encountered a problem. The reason reported was Database error only visible to forum administrators
2025-08-01 [Arend_] I think it's fixed, I don't have the problem.
2025-10-06 [Comet] The UBB Error no longer happens for me.
2025-10-21 [M_Moore] UBB Error We encountered a problem. The reason reported was Database error only visible to forum administrators Please click back to return to the previous page.
2025-10-26 [NTDOC] System has been cleaned up. Should be okay again now.
2025-10-26 [Allen] Thank You Doc. Really appreciate your efforts!

Who's Online
0 registered and 475 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.24 seconds in which 0.186 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org