Does {sys} work?

Writing
Source: C:\windows\system32\msvcr100.dll; DestDir: {app}\util

Open in new window

works ok, but shouldn't I be able equally to write
Source: {sys}\msvcr100.dll; DestDir: {app}\util

Open in new window

? Doesn't work -- gives an error "J:\setup\{sys}\msvcr100.dll" not found. (J:\setup happens to be the logged directory from which Inno is running)

Similarly, I can't get away with
#IfExist "{sys}\msvcr100.dll"

Open in new window

(using Inno Preprocessor). The test simply fails although C:\windows\system32\mscvr100.dll does exist.

Why? What am I doing wrong?
             
ForensMathAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mirtheilSoftware DeveloperCommented:
{sys} is a runtime constant. It is not a compile time constant.  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ForensMathAuthor Commented:
Ah. You mean it doesn't designate a location on my development computer, but on that of the installation target machine.

That's logical in that it's a vital facility to have, whereas I was just looking for a minor convenience. But is there a way to access compile time constants from Inno Setup or Preprocessor? I just ask for a further comment if you have one; you have solved the original problem.
0
ForensMathAuthor Commented:
The answer puzzled me for a few minutes, but as a mathematician I can't whine about brevity.
0
mirtheilSoftware DeveloperCommented:
You can create your own defines using the Preprocessor (#define) at compile time.  If you have an environment variable you want to access you can use GetEnv to set the value.  For example, I use something like:

#define MyTemp GetEnv("temp")

This is just an example, but should give you a starting point.
0
ForensMathAuthor Commented:
Good to know. Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.