PC Review


Reply
Thread Tools Rate Thread

Do local var assignments in batch files have priority over global env vars even for programs ?

 
 
Michael Walsh
Guest
Posts: n/a
 
      3rd Apr 2008
Assume the system PATH variable is set in Control Panel->System globally as:

PATH=D:\aaa\bin;D:\bbb\bin

Then I start a DOS batch file mytest.bat with the following content:

set PATH=D:\bbb\bin;%PATH%

Note that the folder D:\bbb\bin has now priority over D:\aaa\bin!

Now I start from within the same batch file a program:

myprog.exe param1 param2

Does this program now use (if necessary) programs from the aaa\bin or bbb\bin
directory?

If the programs uses the globally defined vars and ignores the just done assignments:
Is there a way to create a local, temporarily changed environment for the run of a certain program otherwise?

Michael

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do local var assignments in batch files have priority over global env vars even for programs ? Michael Walsh Windows XP Help 5 4th Apr 2008 10:32 AM
How to do global vars? VB Programmer Microsoft VB .NET 4 2nd Nov 2005 08:36 AM
global vars in ASP.NET =?Utf-8?B?Y0ZsZXVyeQ==?= Microsoft ASP .NET 4 8th Apr 2005 08:29 PM
Pass Javascript vars to global vars in asp.net rbutch@coair.com Microsoft ADO .NET 1 21st Mar 2005 06:39 AM
Priority & Ranking Assignments BKing Microsoft Excel Programming 3 18th May 2004 08:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:35 AM.