473,587 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "%XYZVariab le%" == "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 2833
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
320
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 some reason this event is not supported for web service applications. The documentation on build events states that it's not available for web...
10
9151
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);}, false); }
3
1449
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 main and want to set char* x or int x equal to what is read. How does that work? Thank you
0
1765
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 exception of the output directory name, the commands are exactly the same! If I remove the regasm line from the "broken" configuration, it works. The error...
2
5148
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 I am new to this. Full code below : using System; using System.Collections; using System.ComponentModel;
13
3492
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 following issues still exist. The article shows how to find methods on a receiver that match the pattern OnXXXX given the sender. It loops through...
1
439
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 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...
0
2939
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 such as when they do a delete. Everything is great. By and large it will be used in my repeater controls using the command event when the user...
4
7019
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 server-side button event retrieve the string I have set. for example: in Javascript - I have set this string variable --> '123456' I call a do...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.