T O P I C R E V I E W |
letay@ise.1 |
Posted - 08/14/2002 : 11:02:23 AM Is there any possibility to get the contents of a system environment variable for example the %temp% variable into a labtalk variable?
Thanks in advance
Gergoe
P.S.: I am using Origin 6.1 on Win 2000 |
3 L A T E S T R E P L I E S (Newest First) |
letay@ise.1 |
Posted - 09/12/2002 : 10:18:11 AM Greate, thanks that helped
:g) |
Mike Buess |
Posted - 08/14/2002 : 1:11:20 PM You can access system environment variables from Origin using the run -e command to create an INI file containing those variables and then accessing them with the INI object.
## Create INI file. %A depends on your OS ## %A=command.com; // If OS is Win9x (or WinMe? not sure) ## %A=cmd.exe; // if OS is NT4, Win2k or WinXP run -e %A /C echo [Variables]>%Ywin.ini; // Create file and section header sec -p 0.1; // Give the command time to complete before continuing run -e %A /C set >> %Ywin.ini; // Copy environment variables to file sec -p 0.1; // Pause again
## Variables can now be treated as INI keys ini.file$=%Ywin.ini; %A=ini.Variables.windir$; %A=; // get windows directory, for example
Hope that helps.
Mike Buess Origin WebRing Member |
greg |
Posted - 08/14/2002 : 12:23:20 PM There is no access to system environment variables, except for the one you mention specifically : %TEMP%. You can get this variable with: system.path.findtemp(L); which puts the %TEMP% environment variable in the %L LabTalk string variable.
|