How to set environment variable for my application when profiling it in visual studio 2008

I have an application. I will compile it using vs2008 command system. To run this application, you need to set some specific environment variables, for example SYSTEM_MODULE_PATH. My application loads system modules from there. Without this variable, it will not work. Therefore, when I look at it, I want to set this variable so that my application runs correctly.

Now my question is: where to set this variable?

+3
profiling visual-studio-2008 profiler
source share
2 answers

I fixed it when I asked. But did not share. Here is what I did.

I created a batch file (.cmd). I set the environment variable there. Then they started Visual Studio using the devenv . Below is an example of a batch file

 rem Sample Environment loader for VS SET ENV_VAR1=Value1 SET ENV_VAR2=Value2 SET ENV_VAR3=Value3 devenv \path\to\solution\file 

Visual Studio now opens with the ENV variable loaded.

+1
source share

Start → Control Panel → System → Advanced Tab → Environment Variables

or CMD → SET [variable = [string]]

+1
source share

All Articles