Windows shell desktop path

Windows Shell

The Windows UI provides users with access to a wide variety of objects necessary for running applications and managing the operating system. The most numerous and familiar of these objects are the folders and files that reside on computer disk drives. There are also a number of virtual objects that allow the user to perform tasks such as sending files to remote printers or accessing the Recycle Bin. The Shell organizes these objects into a hierarchical namespace and provides users and applications with a consistent and efficient way to access and manage objects.

Shell Development Scenarios

The following development scenarios relate to application development:

  • Extending the Shell, which consists of creating a data source (versus consuming the Shell data model)
  • Implementing a subset of the Shell data source tasks
  • Supporting libraries and item views in Windows Explorer
  • Using the common file dialog
  • Implementing Control Panel items
  • Managing notifications

The following development scenarios relate to file format ownership:

  • Implementing a subset of the Shell data source tasks
  • Implementing any handler
  • Supporting desktop search

The following development scenarios relate to data storage ownership:

  • Supporting desktop search and OpenSearch
  • Implementing a subset of the Shell data source tasks (virtual folders)
  • Supporting libraries in Windows Explorer

The following development scenario relates to device support:

  • Auto run and auto play

Windows Shell SDK Documentation

This documentation is broken into three major sections:

  • The Shell Developer’s Guide provides conceptual material about how the Shell works and how to use the Shell’s API in your application.
  • The Shell Reference section documents programming elements that make up the various Shell APIs.
  • Shell Samples provides links to related code samples.

The following table provides an outline of the Shell Reference section. Unless otherwise noted, all programming elements are documented in unmanaged C++.

Windows CMD: PATH Variable – Add To PATH – Echo PATH

PATH is an environment variable that specifies a set of directories, separated with semicolons ( ; ), where executable programs are located.

In this note i am showing how to print the contents of Windows PATH environment variable from the Windows command prompt.

I am also showing how to add a directory to Windows PATH permanently or for the current session only.

Cool Tip: List environment variables in Windows! Read More →

Читайте также:  Thunderbolt диск для windows

Echo Windows PATH Variable

Print the contents of the Windows PATH variable from cmd :

The above commands return all directories in Windows PATH environment variable on a single line separated with semicolons ( ; ) that is not very readable.

To print each entry of Windows PATH variable on a new line, execute:

Cool Tip: Set environment variables in Windows! Read More →

Add To Windows PATH

Warning! This solution may be destructive as Windows truncates PATH to 1024 characters. Make a backup of PATH before any modifications.

Save the contents of the Windows PATH environment variable to C:\path-backup.txt file:

Set Windows PATH For The Current Session

Set Windows PATH variable for the current session:

Set Windows PATH Permanently

Run as Administrator: The setx command is only available starting from Windows 7 and requires elevated command prompt.

Permanently add a directory to the user PATH variable:

Permanently add a directory to the system PATH variable (for all users):

Info: To see the changes after running setx – open a new command prompt.

Shell Path Handling Functions

This section describes the Windows Shell path handling functions. The programming elements explained in this documentation are exported by Shlwapi.dll and defined in Shlwapi.h and Shlwapi.lib.

In this section

Topic Description
PathAddBackslash Adds a backslash to the end of a string to create the correct syntax for a path. If the source path already has a trailing backslash, no backslash will be added.

[!Note]
Misuse of this function can lead to a buffer overrun. We recommend the use of the safer PathCchAddBackslash or PathCchAddBackslashEx function in its place.

PathAddExtension Adds a file name extension to a path string.

[!Note]
Misuse of this function can lead to a buffer overrun. We recommend the use of the safer PathCchAddExtension function in its place.

PathAppend Appends one path to the end of another.

[!Note]
Misuse of this function can lead to a buffer overrun. We recommend the use of the safer PathCchAppend or PathCchAppendEx function in its place.

PathBuildRoot Creates a root path from a given drive number. PathCanonicalize Simplifies a path by removing navigation elements such as «.» and «..» to produce a direct, well-formed path. PathCombine Concatenates two strings that represent properly formed paths into one path; also concatenates any relative path elements.

[!Note]
Misuse of this function can lead to a buffer overrun. We recommend the use of the safer PathCchCombine or PathCchCombineEx function in its place.

PathCommonPrefix Compares two paths to determine if they share a common prefix. A prefix is one of these types: «C:\\», «.», «..», «..\\». PathCompactPath Truncates a file path to fit within a given pixel width by replacing path components with ellipses. PathCompactPathEx Truncates a path to fit within a certain number of characters by replacing path components with ellipses. PathCreateFromUrl Converts a file URL to a Microsoft MS-DOS path. PathCreateFromUrlAlloc Creates a path from a file URL. PathFileExists Determines whether a path to a file system object such as a file or folder is valid. PathFindExtension Searches a path for an extension. PathFindFileName Searches a path for a file name. PathFindNextComponent Parses a path and returns the portion of that path that follows the first backslash. PathFindOnPath Searches for a file. PathFindSuffixArray Determines whether a given file name has one of a list of suffixes. PathGetArgs Finds the command line arguments within a given path. PathGetCharType Determines the type of character in relation to a path. PathGetDriveNumber Searches a path for a drive letter within the range of ‘A’ to ‘Z’ and returns the corresponding drive number. PathIsContentType Determines if a file’s registered content type matches the specified content type. This function obtains the content type for the specified file type and compares that string with the pszContentType. The comparison is not case-sensitive. PathIsDirectory Verifies that a path is a valid directory. PathIsDirectoryEmpty Determines whether a specified path is an empty directory. PathIsFileSpec Searches a path for any path-delimiting characters (for example, ‘:’ or ‘\’ ). If there are no path-delimiting characters present, the path is considered to be a File Spec path. PathIsHTMLFile Determines if a file is an HTML file. The determination is made based on the content type that is registered for the file’s extension. PathIsLFNFileSpec Determines whether a file name is in long format. PathIsNetworkPath Determines whether a path string represents a network resource. PathIsPrefix Searches a path to determine if it contains a valid prefix of the type passed by pszPrefix. A prefix is one of these types: «C:\\», «.», «..», «..\\». PathIsRelative Searches a path and determines if it is relative. PathIsRoot Determines whether a path string refers to the root of a volume. PathIsSameRoot Compares two paths to determine if they have a common root component. PathIsSystemFolder Determines if an existing folder contains the attributes that make it a system folder. Alternately, this function indicates if certain attributes qualify a folder to be a system folder. PathIsUNC Determines if a path string is a valid Universal Naming Convention (UNC) path, as opposed to a path based on a drive letter. PathIsUNCServer Determines if a string is a valid UNC for a server path only. PathIsUNCServerShare Determines if a string is a valid UNC share path, \\server\share. PathIsURL Tests a given string to determine if it conforms to a valid URL format. PathMakePretty Converts an all-uppercase path to all lowercase characters to give the path a consistent appearance. PathMakeSystemFolder Gives an existing folder the proper attributes to become a system folder. PathMatchSpec Searches a string using a MS-DOS wildcard match type. PathMatchSpecEx Matches a file name from a path against one or more file name patterns. PathParseIconLocation Parses a file location string that contains a file location and icon index, and returns separate values. PathQuoteSpaces Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks. PathRelativePathTo Creates a relative path from one file or folder to another. PathRemoveArgs Removes any arguments from a given path. PathRemoveBackslash Removes the trailing backslash from a given path.

PathRemoveBlanks Removes all leading and trailing spaces from a string. PathRemoveExtension Removes the file name extension from a path, if one is present.

[!Note]
This function is deprecated. We recommend the use of the PathCchRemoveExtension in its place.

PathRemoveFileSpec Removes the trailing file name and backslash from a path, if they are present.

[!Note]
This function is deprecated. We recommend the use of the PathCchRemoveFileSpec function in its place.

PathRenameExtension Replaces the extension of a file name with a new extension. If the file name does not contain an extension, the extension will be attached to the end of the string.

[!Note]
Misuse of this function can lead to a buffer overrun. We recommend the use of the safer PathCchRenameExtension function in its place.

PathSearchAndQualify Determines if a given path is correctly formatted and fully qualified. PathSetDlgItemPath Sets the text of a child control in a window or dialog box, using PathCompactPath to ensure the path fits in the control. PathSkipRoot Retrieves a pointer to the first character in a path following the drive letter or UNC server/share path elements. PathStripPath Removes the path portion of a fully qualified path and file. PathStripToRoot Removes all file and directory elements in a path except for the root information.

[!Note]
Misuse of this function can lead to a buffer overrun. We recommend the use of the safer PathCchStripToRoot function in its place.

Where is the real Desktop folder path in Windows 8.1 / 8 / 10?

To open the real Desktop folder path in Windows 8, 8.1, 10 and Windows-7, please start the MS-Explorer!

The real desktop directory (folder) and the desktop you see are not on Windows and not the same, here is a simple example of how to open these folders, to clear the question of many users what is the path name of the desktop in windows an how to find Desktop background folder!

1.) . Opening the standard desktop under Windows!
2.) . Open another real desktop folder!
3.) . Tip: The Desktop background directory?

1.) Opening the standard desktop under Windows!

Run the Explorer via keyboard shortcut [Windows + E] and type in the address-bar the address:
is shell:UsersFilesFolder\Desktop and not %UserProfile%\Desktop (. see Image-1 Arrow-1)

Does not work on the Run-Command Dialog [Windows R], in Windows 8 / 8.1!

And other nice paths for MS-Explorer and . file manager Q-Dir in Windows 8/8.1:
shell:Libraries, shell:MusicLibrary, shell:VideosLibrary, shell:OtherUsersFolder, shell:Device Metadata Store,
shell:PublicSuggestedLocations, shell:DocumentsLibrary, shell:User Pinned, shell:UsersLibrariesFolder,
shell:PicturesLibrary, shell:ImplicitAppShortcuts, shell:Ringtones, shell:CommonRingtones . more shell:folders

Tip: Address-Bar-Focus: [F4]

Image-1

The real Desktop folder path and directory in Windows 8

2.) Open another real desktop folder!

Each user has a private folder in which one is desktop folder is, quite simply can links between the user account from a desktop folder to another desktop folder to copy or move.

(Image-2) All Desktops folders path on all Windows!

The Default Desktop background directory on Windows 10/8.1/7!

Desktop Backgrounds folder location is in C:\Windows\Web!

Please start the File-Explorer for example via Keyboardshortcut [Windows-Logo]+[E] and open the

Default Wallpaper Folder: C:\Windows\Web\Wallpaper or %windir%\Web\Wallpaper

Optional Keyboardshortcut [Windows-Logo]+[R] and (. see Image-3 Point 1 and 2)

Читайте также:  Mac os zsh git autocomplete
Оцените статью