Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect that app is running under netware
Message
From
15/04/2008 09:08:43
 
 
To
15/04/2008 03:01:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01310632
Message ID:
01310657
Views:
16
This message has been marked as the solution to the initial question of the thread.
Which client are they running (Novell or windows)? Do they share the same login for windows and novell? Some do, some don't. Check for a Novell Username. You can also check for it in the registry under HKEY_CURRENT_USER (also NWUSERNAME). Also, there is a netware API you can call and if it fails, no netware.

Some clients use the login variable:
PUBLIC logname
IF VARTYPE(logname)<>"C" .or. LEN(ALLTRIM(logname))<6
        *this.logname is property of application object
        *if you do not have a property just store it to a variable
	this.logname=GETENV('LOGIN')  && Novell login name
	logname=this.logname
ENDIF
IF LEN(ALLTRIM(logname))<6
	store "UNKNOWN" TO logname
ENDIF
but more reliable is NWUSERNAME (Novell adds that environment variable during installation of the client):
PUBLIC logname
IF VARTYPE(logname)<>"C" .or. LEN(ALLTRIM(logname))<6
        *this.logname is property of application object
        *if you do not have a property just store it to a variable
	this.logname=GETENV('NWUSERNAME')  && Novell login name
	logname=this.logname
ENDIF
IF LEN(ALLTRIM(logname))<6
	store "UNKNOWN" TO logname
ENDIF
Also, some windows api work fine. For example, Zenworks application launcher calls a windows api to get the process list. It depends on where the processing is done and which api you are calling.


>Hi folks,
>
>how can I detect, that the current server or workstation is running netware?
>I'd like to throw a message, that some functionality in our apps, due to several win32api calls, isn't available.
>
>GETENV([OS]) just says 'Windows_NT'. Until now, searching UT and googling wasn't successful.
>
>Any tips or links are very much appreciated
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform