Variables in the jde.ini

Guest

Guest
Has anyone used variables in the jde.ini file before? If so, what is the
syntax that you used?

We are setting up the integration between the workcenter mail and Outlook.
The problem we've encountered is that we have 200 users with unique mail
profiles on their workstations. The mailprofile=<Profile Name> section
will have to be changed on each ini file to match the unique profile. We
are just looking for ways around doing this manual task!

Thanks
Mechele
Xe, SP15.1, Unix, Oracle



Visit iWon.com - the Internet's largest guaranteed cash giveaway! Click
here now for your "Thank You" gift:
http://www.iwon.com/giftcenter/0,2612,,00.html?t_id=20157
 
You can use jdeWritePrivateProfileString to do the job in a business function. Here is an example:

if (jdeWritePrivateProfileString("SVR", "EnvironmentName", lpDS->szPathCode))
{
idReturnCode = BHVR_SUCCESS;
}

alternately, if you want to use a non-JDE C function, you could use the C API:

WritePrivateProfileString(A,B,C,INIFILENAME)

where INIFILENAME is the path to the jde.ini

VisualBasic has an equivalent API as well.

When you do a new client workstation install, you probably have noticed that the "mail=" will get reset to blank on the client workstation's jde.ini. This is because the client install is copying a "pristine" jde.ini from the deployment server to the client.

The trick becomes how to dynamically change the "mail=" value during the install. Can you feel the suspense?

The answer is to use "Features". You can define a feature that runs an executable after the install is done. This way, you can create an executable that uses the jde.ini access APIs above to set the "mail=" value after the install.

You will need to define two features:

1) a feature that delivers your "mail=" setting executable to the client.
2) a feature that executes your executable after the install.

For information on features, refer to the Package Management guide on the Knowledge Garden. Be sure to associate your new feature with each package that delivers a JDE.INI file. That way, when you deploy the package, the feature goes with it.
 
Have a look at
http://www.kixtart.org/
This is a FREE scripting language for windows that allows easy update of ini file settings and registry entries.

To add or modify a ini setting you add this line to a script
WriteProfileString("JDE.INI",section_name,key_name,value)

Kix can read in the current username, workstation etc or if you set the profile name as an Environment variable it could also use this.

As part of the login this script could run to automatically make this change. Especially good on Terminal Servers!
 
Back
Top