$(programFiles) Environment variable

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
Post Reply
PStadler
Posts: 22
Joined: Sun Oct 18, 2009 7:14 pm

$(programFiles) Environment variable

Post by PStadler »

Hello,

Currently I have hardcoded the path to my 32bit executable in the enigma project file. But If I build it on 32bit OS it will be different to 64 Bit OS.

On 32bit it is C:\Program Files\Firm\Application\Application.exe
on 64Bit it is C:\Program Files (x86)\Firm\Application\Application.exe

How can I use environment variable like in Delphi $(programFiles) in enigma32g for Input path and output path?
Something like : $(programFiles)\Firm\Application\Application.exe

Sincerely

Peter
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: $(programFiles) Environment variable

Post by Enigma »

Hi Peter,

Got your idea but not sure it is useful.

Firstly because Program Files folder is protected by default in Vista and Seven, and there is no ability to write files there. Writing to program files is not good idea at all.

Secondly, you can use some batch file for protection. I.e. use console version of Enigma Protector to protect your files, and then use "copy" command to copy protected file to necessary location.

Also, Windows already has a set of pre-defined system variables. For example, %SystemRoot% variable will be replaced with "C:\'Windows\" and so on. Probably, there is a solution for Program Files too.

But to my mind, idea with the batch file (with console version of Enigma) is better and allows to automate protection process.
Post Reply