An easy way to add them to your system.
I’m beginning to use environment variables more and more these days for SSIS and find it a pain to have to keep opening the system properties to get to them. An easy way to set, list, or delete them is by using a simple vb script such as the one below. I spent a grand total of about two minutes drawing this one up, but it works and is a lot better than having to continue making the trek through My Computer to get to them. Simply add this to a file, and change the extension to .vbs. Then you can set the names of yours and then double-click on it to have them written to your system.
Lee
--------------------------
Jammin!
'
' VBScript to set environment variables
'
wscript.echo "Adding environment variables..."
set WshShell = CreateObject("WScript.Shell")
' Select the type of variable
set instEnv=WshShell.Environment("User")
' Name and configure your environment variables
instEnv("ETL_SERVER") = "SVR1"
instEnv("ETL_CONFIG_DB_SERVER") = "SVR2"
instEnv("ETL_AUDIT_DB_SERVER") = "SVR3"
instEnv("ETL_CONFIG_DB") = "DB1"
instEnv("ETL_AUDIT_DB") = "DB2"
instEnv("ETL_PKG_FILE_SHARE") = "C:\TEMP"
' Use the following to remove user environment variables
'instEnv.Remove "ETL_SERVER"
' List all vars in all environment types
wscript.echo "Listing environment variables"
set instEnv=WshShell.Environment("User")
for each sitem in instEnv
if (left(sitem,3))= "ETL" then
strval=strval & sItem &vbcrlf
end if
next
wscript.echo "Environment Variable Listing:"&vbcrlf&vbcrlf&strval
strval=""
set instEnv = nothing
d30ae37e-ed7a-4cb4-b5a6-6407146d1211|0|.0