Archive: Get all usernames under XP


Get all usernames under XP
Hello,
I want to install a program for all users on my pc (also with limited users).
For this I have the opportunity to install the config files to the All Users\Application Data - Directory.
But this has a disadvantage: Everyone uses the same config.
How can I install my program to every single user's
C:\Docs and Settings\username\Application Data - Dir ?

Is this possible ?

Thanks in forward.

Bye


Are you using $APPDATA to get at that application data dir? If so, you just need to use:

SetShellVarContext current

before the line with $APPDATA to get the current user's application data dir.

Don't forget to switch back to all users after that if you need it!

I tried this before.
Changing this Variable makes $APPDATA look like this
C:\Docs and Settings\All Users\Application Data
instead of this
C:\Docs and Settings\username\Application Data

But the consequence is that all Users on the PC use the same config.

Is there a workaround ?


IMHO you should install the config under All Users. If a user starts your app for the very first time your has to copy the config files found in "All Users" to the current users.

If this is not possible than write an small NSIS Script as your app start script. If the current user has no config then copy it, if the user already has the config skip copying and start your app.


I made it the following. The Config isn't installed at all. I made my application write it completely by itself.
So there's no problem anymore.

Tahnks !!