BlitzCoder Essentials
•
Home Page
•
About BlitzCoder
•
Contributors
•
Terms of Use
•
Email Us
Main Areas
•
BlitzCoder Chat
•
Discussions
•
Articles/Tutorials
•
Code Database
•
Link Database
•
Showcase Area
•
Worklogs
•
Competitions
Special Areas
•
Undocumented
Other Blitz Sites
•
Blitz Basic Home
•
Blitz Showcase
•
BlitzPlay Library
Forum Login
Username:
Password:
•
Register Now!
BlitzCoder Code Archives Page
Main Codes Page
"GetEnv and SetEnv functions"
, by thechange
Use the GetEnv() and SetEnv() functions to access and modify the Windows environment variables such as the path specification for console applications.
Code
;------------------------------------------------------------------------------; ; Syntax: value$ = GetEnv$( variable$ ) SetEnv$( variable$ , value$ ) ; Clarification: ; Incorporated from the MS-DOS days, existing in the Windows environment, a set ; of variables, with their modifiable (string) values. During system startup, ; the original variables with their values are set. When a program is executed, ; whether a Windows or console application, the original set is copied to this ; session where they can be modified. ; During the runtime of a Blitz application, you are able to read from and write ; to these replicated environment variables using the GetEnv() and SetEnv() ; functions, respectively. ; Example: SetEnv( "PATH" , GetEnv( "PATH" ) + ";D:\PATH" ) ; This is one of the most useful examples of the commands, where you can add a ; custom path to the default path specification for console applications. ; Have fun :D ;------------------------------------------------------------------------------;
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.
Code software created by Krylar's Kreations