1
vote
2answers
129 views

how to access variables that are set in a different windows batch file?

i have a windows batch file - called fileA.bat, which contains a variable set in it. Sample code of fileA.bat: set fileA_username=michael now i have another batch file, called fileB.bat, which ...
0
votes
2answers
133 views

How put path changing .bat file inside %PATH%?

I have a problem described here (you can read it for better understanding). I need to write .bat file that change path. For example: While sending a command in cmd: cd ~ I want to go to %HOMEPATH%. ...
0
votes
1answer
236 views

Set enviroment variable setx

I am setting a environment variable with setx(win7) in a cmd , that I started from a batch file, if I close the shell an open a new from batch file again and use Set command to check it, I do not get ...
0
votes
2answers
1k views

Using Call SET to Designate a Variable in a Dos Batch “For” Loop

Trying to use the Call SET to set a variable in a windows batch file loop. Not working but here is the input / output file. trying to assign Var C to equal 1. Batch file: @ECHO OFF for /f ...
0
votes
2answers
500 views

How do I stop the command window from automatically closing at the end? [duplicate]

Possible Duplicate: Batch file that runs cmd.exe, a command, and then stays open at prompt I have a set of environmental variables that I have to run before I can run other operations. I ...
0
votes
1answer
8k views

How can I refresh my PATH variable from the registry, without a reboot, logoff, or restarting explorer?

I've made some changes to the %PATH% variable in the registry. Now, I'd like to see those changes applied without having to go so far as a logoff, reboot, or reload of Explorer. Is there a way this ...
10
votes
1answer
9k views

How can I permanently append an entry into the system's PATH variable, via command line?

What I need to do: Append a folder to the %PATH% environment variable at the SYSTEM level. Make the change permanent. How I need to do it: Using the command prompt, or another method by which ...
2
votes
2answers
525 views

Variable Names Between Called Batch Files

Let's say I have two batch files, foo.bat and bar.bat, that are located like so: root\foo.bat root\grub\bar.bat Let's also say that both files contain a line that sets a variable, like so: set ...
0
votes
2answers
519 views

How to set the arithmetic precision in “set” batch files variables?

How do I set a precision to the SET arithmetic operation on divisions? eg. SET /A t=3/4 But that gives result as '0' and not '0.75' ( I want at least 2 decimal places ) Or is there any other ...
0
votes
1answer
3k views

Custom Windows 7 environment variable not working

I created a new environment variable via Windows 7 advanced system settings: VAR_MYPATH = "D:\someFolder" I added the new variable to the path in the same dialog: PATH = ...;%VAR_MYPATH% When I ...