- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to get the environment information for the current local user on an win xp or win 2000 system. The information should include the current home path of the user and the current temp directory.
Any help will be appreciatet.
Thanks in advance
Frank
Any help will be appreciatet.
Thanks in advance
Frank
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See GETDRIVEDIRQQ in module IFPORT, for example.
Lars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
USE DFWIN
CHARACTER(MAX_PATH):: sTemp, sHome
INTEGER:: iLen
iLen = GetTempPath(LEN(sTemp), s??mp)
iLen = ShGetSpecialFolderPath(0, sHome, CSIDL_PROFILE,0)
CSIDL_PROFILE returns the user settins root directory (typically Documents and SettingsUserName). Do not assume that "My documents" is within it if you need it (it is not for me, on the first place) -- use CSIDL_PERSONAL instead. Also, CSIDL_COMMON_APPDATA is the place where you should store your computer-global configuration files, and CSIDL_LOCAL_APPDATA is the place for user-specific files.
HTH,
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page