A
Afaque Ahmad
--0-1973032334-1117109779=:52407
Content-Type: text/plain; charset=us-ascii
Dear Ruby Members,
I am having problems setting and reading enviroment variables from a windows batch file.
This is what I am doing, I have some batch file xyz.bat where I am setting some enviroment
variable
SET ENV_VAR1 = "something"
SET ENV_VAR2 = "foo"
I wish to run the batch file from ruby script , wherein which I can use these environment variables within the ruby file itself. I use the following command to run the batch file
system("xyz.bat")
But even after doing this , the environment variables ENV_VAR1 and ENV_VAR2 don't get set.
I even tried using
exec("xyz.bat")
system("cmd /k xyz.bat")
I would really appreciate it if anybody could tell me what I am doing wrong here.
Regards,
Afaque
Content-Type: text/plain; charset=us-ascii
Dear Ruby Members,
I am having problems setting and reading enviroment variables from a windows batch file.
This is what I am doing, I have some batch file xyz.bat where I am setting some enviroment
variable
SET ENV_VAR1 = "something"
SET ENV_VAR2 = "foo"
I wish to run the batch file from ruby script , wherein which I can use these environment variables within the ruby file itself. I use the following command to run the batch file
system("xyz.bat")
But even after doing this , the environment variables ENV_VAR1 and ENV_VAR2 don't get set.
I even tried using
exec("xyz.bat")
system("cmd /k xyz.bat")
I would really appreciate it if anybody could tell me what I am doing wrong here.
Regards,
Afaque