Archive: Need help with all users!


Need help with all users!
Hello!

I'm creating some instalation and i have to copy config file in application data folder for every user. I use propertu
SetShellVarContext all but then the config file is copied into C:\documents and settings\All users\Application data but not for each user! and if for windows add some new user,then need that config file to copy for the new user too!

Maybe someone have some suggestions?

Dexter


You could enumerate the users at install time, load their profile and copy to their appdata folder, but that would not solve the new user problem (And users that don't want to use your program get useless files in their profile). Why not store a basic config file in programfiles or common files and add some logic to your program instead that will copy the base config to the users appdata the first time the user runs your program


If you want new users to get the config file you should also place it in C:\documents and settings\Default User\Application data.

However Anders has a good point, it may be more functional to copy the config file to a user's AppData folder when they execute your program for the first time.

CF