Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How do I see I'm logged on?

Keywords: 	 currently logged on

Question:

How can I determine whether I am logged on?

I am a lazy person: I want to support only one WB-program that works on Networked and StandAlone-PC's.

If Network then copy some Network-stuff else don't even try.

However I cannot find the function that gives me this information.

Any ideas?

Answer:

You could poke around in the registry and try to see if network drivers are installed. But that does not mean it is not connected to the network.

You could try and read the network file...and try to suppress the error.

Maybe something like:

	ErrorMode(@off)
	test=FileOpen("\\unc\share\dummy.txt","READ")
	ErrorMode(@cancel)
	if test!=0 then FileClose(test)
Now if test==0 then the file was not accessable - Standalone mode.
Article ID:   W14158
Filename:   How do I see I'm logged on.txt