Questions tagged [windows-shell]

The Windows Shell is the main graphical user interface in Windows hosted by Windows Explorer. It also implements a shell namespace that enables computer programs running on Windows to access the computer's resources via the hierarchy of shell objects.

The Windows Shell is the main graphical user interface in Windows hosted by Windows Explorer. Important features of Windows Shell include the Desktop, Taskbar, Start Menu, et cetera. Extending functionality of Windows Shell is possible using shell extensions.

In the shell namespace hierarchy "Desktop" is the top object; below it there are a number of files and folders stored on the disk, as well as a number of special folders whose contents are either virtual or dynamically created like the Recycle Bin, Libraries, Control Panel, This PC and Network.

Read more regarding the Windows Shell here:

https://en.wikipedia.org/wiki/Windows_shell

751 questions
9
votes
2 answers

How to get embedded Explorer IShellView to be browsable (i.e. trigger BrowseObject event)

i am "embedding Windows Explorer" in my Win32 application. (Technically i am hosting a ShellView of a folder in my application, which is what Windows Explorer does). The problem is that the view is never calling IShellBrowser.BrowseObject. Rather…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
9
votes
3 answers

How can I immediately reload a folder icon when desktop.ini is changed

I've been trying to change folder icon programmatically using changing desktop.ini on the folder. I was able to set an icon, but couldn't change it immediately through changing "IconIndex". The icon was also changed in a few seconds later. Is there…
Kyokook Hwang
  • 2,682
  • 21
  • 36
9
votes
2 answers

How to pipe multiple sql- and py-scripts

I have the following code copied from github gtfs_SQL_importer: cat gtfs_tables.sql \ <(python import_gtfs_to_sql.py path/to/gtfs/data/directory) \ gtfs_tables_makeindexes.sql \ vacuumer.sql \ | psql mydbname I tried to run this on windows…
MakePeaceGreatAgain
  • 35,491
  • 6
  • 60
  • 111
9
votes
2 answers

How to add submenu items to the Windows Explorer context menu?

I can create a menu item in the Windows Explorer context menu by adding keys in the registry to HKEY_CLASSES_ROOT\Folder\shell. How can I create submenu items to the just created menu item?
Santiago Corredoira
  • 47,267
  • 10
  • 52
  • 56
9
votes
2 answers

How does one add a secondary verb to a file type in Windows shell?

The basic idea with Windows shell programming is that you can associate a given file type (extension) with what MS is currently calling a progid (e.g. Company.Type.Ver): HKCR\.txt @=Acme.Text.1 HKCR\Acme.Text.1 @=This is the progid for text file…
Mordachai
  • 9,412
  • 6
  • 60
  • 112
9
votes
2 answers

Open a folder in Windows Explorer and select a file works second time only

Using the code described in this answer of the SO posting "Open folder and select the file", I've created this function: public static void OpenExplorerAndSelectFile(string filePath) { Process.Start( @"explorer.exe", …
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
9
votes
5 answers

Get common desktop path in .NET

I need to store files into the common desktop on Windows. The application is a very special application for exactly one special PC (device preparation), so it had to be easy for non-techie users to find and modify the configuration file. Now we…
OregonGhost
  • 23,359
  • 7
  • 71
  • 108
8
votes
1 answer

Is it safe to use the SHFileOperation in a worker thread?

I would like to have one background thread which will copy the files through the SHFileOperation function, always only one SHFileOperation at the time (but I want it to be in the thread) I need the UI output, so I need to use the…
Martin Reiner
  • 2,167
  • 2
  • 20
  • 34
8
votes
0 answers

How to parse Explorer breadcrumb path like "This PC\Galaxy Tab A\Card\Folder1" using Windows Shell API?

When a user has navigated in the Windows Explorer to e.g. a folder on the SD-card of his Android phone, the Explorer shows a kind of breadcrumb path like "This PC\Galaxy Tab A\Card\Folder1" when one clicks in the address bar. Windows Explorer also…
Joachim Marder
  • 782
  • 5
  • 12
8
votes
2 answers

Why/how are Registry Entries Hidden in Regedit but visible in PowerShell?

I'm working with a new property schema, and have been in the habit of checking the registry when I register or unregister a new version. One of the primary places to check this is…
Jay Carlton
  • 1,118
  • 1
  • 11
  • 27
8
votes
2 answers

What is the longest file path allowed to be moved to Recycle Bin?

For my application I'm testing the longest available file path to be allowed to be moved into the Recycle Bin and I'm getting interesting results. On Windows XP the maximum size is 259 characters, which is the MAX_PATH constant minus 1. But on my…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
8
votes
4 answers

Waiting until a process created by calling a batch file has completed

MyFile1.bat invokes MyFile2.bat twice: start MyFile2.bat argA, argB, argC start MyFile2.bat argX, argY, argZ At this point, how can I wait until both processes spawned by the calls to MyFile2.bat have completed?
barak manos
  • 29,648
  • 10
  • 62
  • 114
8
votes
2 answers

Use 3rd party context menu (for Windows Explorer) within a C# application?

Unlike others who wish to add items to the Windows Explorer, I want to display a context menu within my application. Now you may be thinking, the class you are looking for is ContextMenu. Let me show you what I am interested in doing. Please excuse…
techvice
  • 1,315
  • 1
  • 12
  • 24
8
votes
3 answers

Name program in the Open With... context menu

How can I customize the name of the program visible in the Open With... context menu in Windows XP and 7? For example: I have 3 versions of a product named XYZ installed on Windows; .x files are associated to xyz.exe (COM registration). All versions…
Sanketh
  • 353
  • 1
  • 4
  • 7
8
votes
3 answers

reference a windows shell interface using .net 4.0

I am using the following code to reference a shell dll Type t = Type.GetTypeFromProgID("Shell.Application"); Shell s = (Shell)Activator.CreateInstance(t); Console.WriteLine("success"); …
user1131926
  • 1,311
  • 2
  • 18
  • 32