Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to findout currentuser ?


1 reply to this topic

reddy611

reddy611
  • Full Members
  • 117 posts

Posted 12 October 2006 - 06:07

Hi,

I am using installshield 10.50 professional - Admin Studio edition (Basic MSI Project).

Problem: Dynamically i want to find out the "current user profile"

Explanation :- I installed Windows XP Operating System in C:\ Drive and my windows loginId is "prathap", you can see this path "C:\Documents and Settings\prathap". Dynamically i want to find the current user profile(prathap) path.


Please can any one suggest me how to find out this?

Please it's very urgency...

Advance thanks,
Prathap

Edited by reddy611, 12 October 2006 - 10:56.


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 12 October 2006 - 13:43

The windows environment variable %USERPROFILE% will give you the base path to the current user's profile folder.

However, you don't need to worry about this, since MSI provides the following predefined user profile locations: LocalAppDataFolder or AppDataFolder or to the My documents folder. The latter can be found with PersonalFolder.

AppDataFolder (roaming - user data travelling with the user):
C:\Documents and Settings\[USERLOGIN]\Application Data

LocalAppDataFolder (not roaming - user data stored per machine):
C:\Documents and Settings\[USERLOGIN]\Local Settings\Application Data
Regards
-Stein Åsmul