Hi,
 
I am trying to capture the ERRORLEVEL env variable when a build fails. Ok the scenario is like this. I am trying to execute an MSI build using the exec task and if this fails, then a folder of name <Folder>.Date.Time.WithErrors has to be created and the MSI package with errors has to be copied here. Now the catch is if I set the failonerror attribute to true, then the build stops. And If I set it to false, I do not have a way to track the status. Currently I am doing the entire process in Batch file where I have the %ERRORLEVEL% variable and I can check this value to create the folders accordingly....I tried creating a VB exe of the following type:
 
dim str as string=Environment.GetEnvironmentVariable("ERRORLEVEL")
but this returns null string.
 
Could anybody help me with this? Or has anyone faced this kind of scenario?
 
Thanks,
Niranjan

Reply via email to