New Boundary Support Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Setting a environment variable in INI file...Expand / Collapse
Author
Message
Posted 6/29/2006 3:53:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 1/30/2007 3:28:02 AM
Posts: 1, Visits: 6
I have an application which places a INI file in the Windows directory. It contains an entry referring to the current users Application Data folder.

To have the app work for all users I want the %AppData% variable placed in the INI file and leave it as is. I don't want it to be resolved by Prism at installation.

The result would be:

folder=%AppData%

Is this possible ?

Erik de Jong
AIPS Delivery Manager
InfraCONTROL

www.packageoutofthebox.nl

Post #1324
Posted 6/29/2006 11:21:40 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 8/8/2008 12:14:02 PM
Posts: 657, Visits: 793
As you know, Prism automatically resolves variables in INI files. In order to leave the variable unresolved, you have to make a change to Prism's rules.ini file. (This is the file that controls Prism's behavior for handling special files such as INI files, special registry settings, etc.) You then copy the edited rules.ini file to a network location and install the Package from within a two-line Prism script. The first command tells the client to use the edited rules.ini, and the second command installs the Package.

First, make the following change to the rules.ini file. Go the the [File Definitions] section and the ExcludeINI line. Add your INI file name to the end of the list, separated by a comma. Save the changed file in a network location accessible by all the client machines.

Next, create your 2-line Prism script using notepad. Save it with .pts extension.

/DefineRulesFile \\server\share\rules.ini

/InstallPackage \\server\share\INIChange.pwc

This should do the trick.



New Boundary Technologies Support
support@newboundary.com

Post #1326
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: New Boundary Support

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 5:16pm

Powered By InstantForum.NET v4.1.3 © 2008
Execution: 0.156. 12 queries. Compression Enabled.