PRB w/ Environment Variables not expanding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We are having trouble with environment variables not expanding. The first environment variable is used in defining the second environment variable
SC_NAME=NUCLEUS_SC
SALESLOG=\\%SC_NAME%\D$\SALESLO

Using the set command displays
SALESLOG=\\%SC_NAME%\D$\SALESLOG

However, it should expand this variable and display
SALESLOG=\\NUCLEUS_SC1\D$\SALESLOG 'NUCLEUS_SC

The SALESLOG environment variable is expanded only after it is removed (set SALESLOG= ) then recreated again (set SALESLOG=\\%SC_NAME%\D$\SALESLOG)

Tried setting the first environment variable (SC_NAME) build order to 1002 while the second variable build order is set to 1001 but this did not fix the problem

Any suggestions
 
Tony,

What is the exact way of setting the variables in your Configuration?
Why do you mention "build order"?

--
Regards,
KM, BSquare Corp.

We are having trouble with environment variables not expanding. The first environment variable is used in defining the second environment variable:
SC_NAME=NUCLEUS_SC1
SALESLOG=\\%SC_NAME%\D$\SALESLOG

Using the set command displays :
SALESLOG=\\%SC_NAME%\D$\SALESLOG

However, it should expand this variable and display:
SALESLOG=\\NUCLEUS_SC1\D$\SALESLOG 'NUCLEUS_SC1

The SALESLOG environment variable is expanded only after it is removed (set SALESLOG= ) then recreated again (set SALESLOG=\\%SC_NAME%\D$\SALESLOG).

Tried setting the first environment variable (SC_NAME) build order to 1002 while the second variable build order is set to 1001
but this did not fix the problem.
 
Hi Tony,

Put that set commands in one batch file and execute it during some FBA phase. (preferably close to the end).

Populating registry with build order is irrelevant since this apply only to design time (TD) not to run time.
If you want to go without bat file (not recommended) then you will have to call cmd.exe at certain FBA phases with set parameters.

Regards,
Slobodan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tony Yanez said:
We are having trouble with environment variables not expanding. The first environment variable is used in defining the second environment variable:
SC_NAME=NUCLEUS_SC1
SALESLOG=\\%SC_NAME%\D$\SALESLOG

Using the set command displays :
SALESLOG=\\%SC_NAME%\D$\SALESLOG

However, it should expand this variable and display:
SALESLOG=\\NUCLEUS_SC1\D$\SALESLOG 'NUCLEUS_SC1

The SALESLOG environment variable is expanded only after it is removed (set SALESLOG= ) then recreated again (set SALESLOG=\\%SC_NAME%\D$\SALESLOG).

Tried setting the first environment variable (SC_NAME) build order to 1002 while the second variable build order is set to 1001
but this did not fix the problem.
 
Back
Top