looking for some help of qb/fb commands
Posted: Fri Dec 16, 2011 11:52 am
here is my problem
compile and run this:
#Include "crt/stdlib.bi"
SetEnviron "return=c:\" 'set return equal to c drive
print "return is currently set to "; Environ ("return") 'print the c:\
SetEnviron "return=" + CurDir 'set return equal to current directory path
print "the new return value is ";environ("return") 'print the current directory path
shell("set return=" + curdir)
Shell("setx path ""return;C:\windows""")
Print "setx has now set return to "; Environ("Return")
sleep
after running, check the envvar "return" and see what value it is set to. if you did not preset it, then the value you return after running the program will be nil. if the "return" is valid and set to a folder path, then it will not set it to root or windows upon exit, it will be what it was before you ran the command.
help anyone?
compile and run this:
#Include "crt/stdlib.bi"
SetEnviron "return=c:\" 'set return equal to c drive
print "return is currently set to "; Environ ("return") 'print the c:\
SetEnviron "return=" + CurDir 'set return equal to current directory path
print "the new return value is ";environ("return") 'print the current directory path
shell("set return=" + curdir)
Shell("setx path ""return;C:\windows""")
Print "setx has now set return to "; Environ("Return")
sleep
after running, check the envvar "return" and see what value it is set to. if you did not preset it, then the value you return after running the program will be nil. if the "return" is valid and set to a folder path, then it will not set it to root or windows upon exit, it will be what it was before you ran the command.
help anyone?