Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The function to write an environment variable is SetEnvironmentVariable(). The code below will create an environment variable called DataPath, representing the path to the application's data. The function will set it to C:\Data\. Paste the code below in the CLICK Event of a button in a window:

...

The code above will not run until the declaration for SetEnvironmentVariable() has been added.  To add the declarations, do the following:

...