Indigo Rose Software
  #1  
Old 10-10-2002
Support Support is offline
Super Moderator
 
Join Date: Jan 2000
Location: Indigo Rose Corporation
Posts: 204
INFO: Finding Shell Folders in the Registry

INFO: Finding Shell Folders in the Registry

INFO: Finding Shell Folders in the Registry

Document ID: IR02021
The information in this article applies to:
  • Setup Factory 6.0

SUMMARY

This article provides information on finding shell folders in the Registry.

DISCUSSION

There are many "special" folders in Windows that are used by many different applications, but their locations on the system may be different from computer to computer and user to user. These folders are called "shell folders". An example of a shell folder is the "My Documents" folder.

The "User Shell Folders" and "Shell Folders" Registry keys generally hold the paths to shell folders for the current user of the computer. These Registry keys can be found in these locations in the Registry:

  • HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\User Shell Folders
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Shell Folders
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\User Shell Folders
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\Shell Folders

The shell folders found in HKCU (HKEY_CURRENT_USER) are generally specific to the current user, and those found in HKLM (HKEY_LOCAL_MACHINE) are generally for the "All Users" profile.

Entries in "HKCU\...\User Shell Folders" will be used by the operating system before entries in "HKLM\...\User Shell Folders". Entries in "Users Shell Folders" will be used before entries in "Shell Folders".

On Windows NT based operating systems (Windows NT 4.0, 2000, XP) entries in "User Shell Folders" will usually have corresponding values in "Shell Folders". Entries in "User Shell Folders" will generally have values similar to: "%USERPROFILE%\Desktop". The corresponding values in "Shell Folders" will have the "%USERPROFILE%" portion of their values expanded when the system boots.

On Windows NT based operating systems it is recommended that you read shell folders from "User Shell Folders" using the Read from Registry action, with the Auto-expand if value of type REG_EXPAND_SZ option selected. This will automatically expand any values like %USERPROFILE% or %SYSTEMROOT%.

On Windows 9x based operating systems (Windows 95, 98, ME) "User Shell Folders" is generally not used as much as "Shell Folders". You may find that most entries in "Shell Folders" may not be in "User Shell Folders".

On Windows 9x it is recommended that you read the shell folder information from "Shell Folders".

Here is a list of some of the available shell folders:

  • AppData
  • Cache
  • Cookies
  • Desktop
  • Favorites
  • History
  • Local AppData
  • Local Settings
  • My Pictures
  • NetHood
  • Personal
  • PrintHood
  • Programs
  • Recent
  • SendTo
  • Start Menu
  • Startup
  • Templates

Warning: It is recommended that you do NOT edit the shell folders unless you know exactly what you are doing and the user has agreed to it. Editing these values can cause serious problems on the user's system.

Before reading a shell folder from the Registry look at the built-in variables available in Setup Factory 6.0 to see if your shell folder is already available. If it is, use the built-in variable instead of reading the value from the Registry. If you are going to read a shell folder from the registry be sure to test your setup (and what you read from the Registry) on all operating systems to make sure that it functions properly.

MORE INFORMATION

For more information please visit the following sources:

  • The topic Command Reference | Variables | Built-in Variables in the Setup Factory 6.0 help file.
  • The topic Command Reference | Actions | Individual Actions | Read from Registry in the Setup Factory 6.0 help file.
  • KEYWORDS: Setup Factory 6.0, Shell Folders


    Last reviewed: October 10, 2002
    Copyright © 2002 Indigo Rose Corporation. All rights reserved.
     

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is On



    All times are GMT -6. The time now is 03:11 AM.


    Powered by vBulletin® Version 3.8.4
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
    Indigo Rose Software