What I was trying to do was get information from the cmd.exe like the current user and ip, then send it directly back to DB or to a txt file that db can then read.
I ended up figuring it out thanks to grog and created a function that will return the IP$ address of the current user.
Here's the function:
function IP()
if file exist("c:\IP.txt")=1 then delete file "c:\IP.txt"
execute file "cmd.exe","/c IPCONFIG>IP.txt","C:\"
repeat
until file exist("c:\IP.txt")=1
open to read 1,"c:\IP.txt"
for st=1 to 23
read string 1,IP$
next st
close file 1
delete file "c:\IP.txt"
IP$=right$(IP$,len(IP$)-44)
endfunction IP$
Here's how you would use it:
print "Your IP address is: ";IP()
suspend for key
end
function IP()
if file exist("c:\IP.txt")=1 then delete file "c:\IP.txt"
execute file "cmd.exe","/c IPCONFIG>IP.txt","C:\"
repeat
until file exist("c:\IP.txt")=1
open to read 1,"c:\IP.txt"
for st=1 to 23
read string 1,IP$
next st
close file 1
delete file "c:\IP.txt"
IP$=right$(IP$,len(IP$)-44)
endfunction IP$