473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

PostBuild Event : Retrieving Environment Variable

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
1 2815
I would test this by making a batch file that only prints few
environment variable values that are needed.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave | last post by:
I use post-build events in a number of projects for various activities (e.g. run unit tests on built assemblies). I want to do this on a web service project that is part of the solution but for...
10
by: b.dam | last post by:
I'm trying the following: function grid() { this._el = document.createElement("TABLE"); var self = this; document.addEventListener("onkeydown", function(event) {self.gridKeyDown(event);},...
3
by: Don | last post by:
I am a beginner in C. A student I should say. Is it possible to retrieve a value from a void function? A have a void function that reads a string or number from a file. I call that function from...
0
by: Lynn Gasch | last post by:
Hi, I just converted a project to VS.NET 2003 (.NET 1.1) and can't seem to fix this odd error in the postbuild step. The steps work in one configuration but not in another, and with the...
2
by: Besta | last post by:
Hello all, I am having trouble creating a windows service with a timer. Everything seems to go ok but the elapsed event does not fire.Can anyone shed any light on this, may be something simple as...
13
by: Charles Law | last post by:
Mr "yEaH rIgHt" posted the following link about a week ago in answer to my question about removing event handlers. > http://www.vbinfozine.com/t_bindevt.shtml Following on from that post, the...
1
by: Shahzad Atta | last post by:
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...
0
by: Demetri | last post by:
I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force a user to confirm if they intended to click it...
4
yarbrough40
by: yarbrough40 | last post by:
can any one tell me if there is a way to pass a string variable to a button click event? ultimately I am looking to fire client side Javascript "__doPostBack('Button1','click','')" and have the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.