PDA

View Full Version : Using MS Windows Variables in .INI files


CelesteNorm
06-03-2005, 06:39 AM
We have a 25 user license for CRT. We have CRT set up on our server so the we

install it from there. After installing CRT, we run a batch file that copies a few

scripts, a custom keymap file, and a custom .ini file. All of this is copied to

C:\Program Files\CRT\~ [Here after refered to as <PF CRT>

After running CRT as the user for the first time, the folder C:\Documents and

Settings\Application Data\Van Dyke Technologies\CRT\ [here after referred to <USER

CRT> ]is created. I then copy <PF CRT>\Scripts, Keymap, and Config to the <USER CRT>

directory. At which time the user just double-clicks on the CRT shortcut on their

Desktop to begin a telnet session with our ERP software.

Herein lies the problem, the user cannot change the keymap file, because CRT uses

the keymap in <PF CRT> rather than <USER CRT>. In order for me to change this so

that the user can change the keymap I simply need to hard edit the path in the .INI file <PF CRT>

to read "Keymap"=C:\Documents and Settings\Norm\Application Data\Van Dyke

Technologies\CRT\Keymap\customkeymep.key

Obviously this presents a problem if a computer has more than one user so eliminate to

that problem I would like to use environmental variables or a variable inside the

.ini filethat would produce the desired result. For Example
"Keymap"=%USERPROFILE%\Application Data\Van Dyke Technologies\~


Any help would be greatly appreciated.

Thanks, Norm

bocks
06-15-2005, 07:54 AM
Hi Norm,

It sounds like you might benefit from mapping the keys into the session .ini file instead of keeping a seperate .key file that you have to move around. You would also eliminate the need to modify the .ini file by hand.

Mapping the keys into the session can be accomplished by opening the session properties, and selecting the Emulation -- Mapped keys category. Any key that you map from this point will create an entry in the session's .ini file.

This would allow each user to customize their own session and mapped keys, while reducing the administration on you.

Please let me know if this helps.

-bocks