It looks like you're new here. Sign in or register to get started.
IF ISCLEAR(WSHShell) THEN CREATE(WSHShell); WSHExec := WSHShell.Exec('nslookup ' + ENVIRON('computername')); WSHTxt := WSHExec.StdOut; WSHTxt.SkipLine; WSHTxt.SkipLine; WSHTxt.SkipLine; ComputerName := COPYSTR(WSHTxt.ReadLine,1,80); ComputerIP := COPYSTR(WSHTxt.ReadLine,10,80); CLEAR(WSHShell); ComputerName:= (ENVIRON('computername')); MyContext := CONTEXTURL; MyDatabase := COPYSTR(MyContext,1,44); MyServer := COPYSTR(MyContext,73,50);
ComputerName := ENVIRON('COMPUTERNAME')
Comments
RIS Plus, LLC
from computer name, Ip address, database name & server name....
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks for your reply, I'll test it out.
What type of variable would WSHShell be?
WSHShell = Automation 'Windows Script Host Object Model'.WshShell
WSHExec = Automation 'Windows Script Host Object Model'.IWshExec
WSHTxt = Automation 'Windows Script Host Object Model'.TextStream
Nav does have the ENVIRON command.
You can do
Here are some other options for ENVIRON:
ALLUSERSPROFILE, APPDATA, CLASSPATH, CLIENTNAME, CommonProgramFiles, COMPUTERNAME, ComSpec, FP_NO_HOST_CHECK, HOMEDRIVE, HOMEPATH, LOGONSERVER, NUMBER_OF_PROCESSORS, OS, Path, PATHEXT, PROCESSOR_ARCHITECTURE, PROCESSOR_IDENTIFIER, PROCESSOR_LEVEL, PROCESSOR_REVISION, ProgramFiles, PROMPT, QTJAVA, SESSIONNAME, SystemDrive, SystemRoot, TEMP, TMP, USERDNSDOMAIN, USERDOMAIN, USERNAME, USERPROFILE VS80COMNTOOLS,windir
These have always worked for me.
Hope this helps,
Regards,
Willy