How to set the PATH variable? 
Author Message
 How to set the PATH variable?

I am trying to port some batch files to JavaScript and need to setup various
PATHs to applications that will be executed from within the script.  How
does one modify the PATH variable in JavaScript/WSH?


Sat, 14 Sep 2002 03:00:00 GMT  
 How to set the PATH variable?
Answered my own question! ->

   var WshShell    = WScript.CreateObject("WScript.Shell");
   var WshSysEnv   = WshShell.Environment("PROCESS");

   // Setup path to things we need...
   var szSupportPath="C:\\My Installations\\__support"
   var szISProgramPath="D:\\Program Files\\InstallShield\\InstallShield 5.5
Professional Edition\\Program"
   var szPFTWProgramPath="C:\\Progra~1\\Instal~1\\Packag~1"

   // Set the search path to find InstallShield's command line tools and
batch support files
   WshSysEnv("PATH") = szSupportPath + ";" + szISProgramPath + ";" +
szPFTWProgramPath + ";" + szSavePath


Quote:
> I am trying to port some batch files to JavaScript and need to setup
various
> PATHs to applications that will be executed from within the script.  How
> does one modify the PATH variable in JavaScript/WSH?



Sat, 14 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. set environment variable path

2. set system path and eviroment variables

3. Object variable or With block variable not set (Error 91)

4. Object variable or With Block variable not set

5. Object variable or with block variable not set

6. cookie's path set to home page

7. set profile path

8. how to set path for font ?

9. Setting Path

10. Set path environment

11. Setting Path

12. how to set PATH (environment) using WSH?

 

 
Powered by phpBB® Forum Software