User windows directory

A

Alex

Hi

I have an application that uses a .ini file and works on a 2000 server
accessed by terminal services clients.

If I put the .ini file in the c:\documentsand settings\user\windows
directory, each time the user opens a session, this .ini file is replicated
on the c:\windows directory, and every user shares it.

I want every user to have his own .ini file. How can I do it ?

Thanks

Alex
 
O

Olof Lagerkvist

Alex said:
Hi

I have an application that uses a .ini file and works on a 2000 server
accessed by terminal services clients.

If I put the .ini file in the c:\documentsand settings\user\windows
directory, each time the user opens a session, this .ini file is replicated
on the c:\windows directory, and every user shares it.

I want every user to have his own .ini file. How can I do it ?

If the application uses Windows API functions to access the .ini files
it is easy to map the .ini files to the user registry and that way get
separate settings for each user.

Mappings are set up in the registry key
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\IniFileMapping

Create a subkey with the same name as the .ini file and set the key's
default value to i.e. USR:Software\NameOfApplication
where you replace NameOfApplication with some name idenitfying the app.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top