Quick Links

Skip to main content Skip to navigation

Main Navigation

Top

Tech Blog

Sign up for the News Update.

Sub Navigation

Top

Headlines

 

Home > breadcrumbs: Products/Services > breadcrumbs: Tech Blog >

Working...

Ajax Loading Image

 

Use SETX to programmatically set environment variables

SETX allows you to set environment variables at the command-line (ex: APSCNGUI).  In the case of APSCNGUI, once you run the SETX batch file, you do not have to reboot after installing the GUI!  This also works for other variables, and there are sources on the web that will show you the full power of SETX.  This can be placed in a bat file stored on a network drive and called from a workstation:
 
In “set-env.bat,” I put these lines:
 
net use x: \\server\folder (where setx is located)
x:
cd distributionshare\apscn
setx DATAPATH C:\APSCNGUI\DATA
SETX PROGPATH C:\APSCNGUI\PROG
c:
net use x: /delete
exit
Now, SETX does not come with Windows by default, but you can get a copy of it from Microsoft:
http://www.microsoft.com/downloads/details.aspx?familyid=49ae8576-9bb9-4126-9761-ba8011fabf38&displaylang=en
Yeah, it unpacks a bunch of other tools I haven’t looked at, but SETX did what I wanted! :-)

Use SETX to programmatically set environment variables

Date Subject Posted by:
No feedback has been posted yet. Please post yours!

Back To Top