By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,266 Members | 1,816 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,266 IT Pros & Developers. It's quick & easy.

PostBuild Event : Retrieving Environment Variable

P: n/a
Hi there,

I am using a batch file to do some zipping task. This batch file get
executed on postbuild event which I set through project properties. Now
when I execute the batch file from command prompt (System Or Visual
Studio.Net) I get the desired behavior. But when I Build the project I am
not getting the desired result.

The batch file includes a if statement which checks an environment variable
and takes the desired action the statement is of the following pattern

If "%XYZVariable%" == "False" goto Label1
XCopy ...
exit 1
:Label1
XCopy2 ...
exit 1

Now what I think is that visual studio is unable to retrieve the
XYZVariable. I added that variable in system Environment variables as well
as vsvars.bat file. Any clue ?? May be I am doing some thing wrong

the postBuild event has the following command run "C:\ABC.bat".

Any help will be appreciated.

Regards,

Shahzad Atta
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I would test this by making a batch file that only prints few
environment variable values that are needed.

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.