windows-explorer

Windows Context menu shell icon

自作多情 提交于 2019-11-29 03:46:29
I have created a new Windows shell context menu item using registry and keys HKLM\Software\Classes\Folder\shell\appname HKLM\Software\Classes\Folder\shell\appname\command now I want to add an icon to this command. How I do that? Windows 7 added support for icons (and submenus) for static (registry) verbs, add a REG_SZ value named "Icon" under HKCR\%ProgID%\shell\%verb% On <= Vista you need a shell extension that implements IContextMenu , see this blog entry for information about which icon/bitmap formats you can use... 来源: https://stackoverflow.com/questions/2093516/windows-context-menu-shell

Implement “Open Containing Folder” and highlight file

微笑、不失礼 提交于 2019-11-29 00:11:13
问题 This can be a handy functionality to have in a program that works with files/folders. It's easy enough to actually open the containing folder using: System.Diagnostics.Process.Start( *path to folder* ); ...but how do I go about actually selecting the target file within that parent folder? If I use the Process.Start method it actually attempts to open the file. 回答1: According to Windows Explorer Command-Line Options you just need to start an explorer process with /select parameter. For

How to extend Windows Explorer with a custom panel

爷,独闯天下 提交于 2019-11-28 14:43:35
I would like to extend Windows Explorer with a custom bottom or right panel (like the image below). From what I have been reading, I think I should start by implementing IShellView. Is this correct? Can anyone give me a few pointers how to do this in .net? Thanks You must implement IDockingWindow. Result will be look like this: One of the scenario: 1) Create BHO with IObjectWithSite support. 2) Inside IObjectWithSite.SetSite call Site.QueryInterface(IServiceProvider, ServiceProvider) 3)Then call ServiceProvider.QueryService(SID_SShellBrowser, IDockingWindowFrame, DockingWindowFrame). 4) Then

Tree view of a directory/folder in Windows? [closed]

老子叫甜甜 提交于 2019-11-28 13:44:38
问题 In Linux/KDE, I can see a directory as a tree. How can I do it in Windows 7? Consider I do NOT mean "Windows Explorer". This just shows the directories, I also want the files. 回答1: In the Windows command prompt you can use "tree /F" to view a tree of the current folder and all descending files & folders. In File Explorer under Windows 8.1: Select folder Press Shift, right-click mouse, and select "Open command window here" Type tree /f > tree.txt and press Enter Use MS Word to open "tree.txt"

Refresh Windows Explorer in Win7

﹥>﹥吖頭↗ 提交于 2019-11-28 07:35:29
My program sets "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" value "Hidden" . Hovewer I'm not able to refresh the explorer to take into account this change. I've tried: 1) SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, IntPtr.Zero, IntPtr.Zero);` 2) SHELLSTATE state = new SHELLSTATE(); state.fShowAllObjects = (uint)1; SHGetSetSettings(ref state, SSF.SSF_SHOWALLOBJECTS, true); 3) SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETNONCLIENTMETRICS, 0, SMTO_ABORTIFHUNG, 5000, ref dwResult); 4) SendMessage(HWND_BROADCAST, WM_COMMAND, 28931 /* Refresh */, 0);

Check if windows explorer already opened on given path

泄露秘密 提交于 2019-11-28 05:36:02
问题 How can I see if windows explorer is already opened with certain path ? I don't want my application opens many duplicated windows. I was unable to do it with this way : var H: hwnd; begin if FileExists(edt8.Text) then begin H := FindWindow(0, PChar(ExtractFilePath(edt8.Text))); if H <> 0 then ShowMessage('explorer already opened')//explorer bring to front else ShellExecute(Application.Handle, nil, 'explorer.exe', PChar(ExtractFilePath(edt8.Text)), nil, SW_NORMAL); end; end; 回答1: IShellWindows

Python: Get a list of selected files in Explorer (WIndows 7)

和自甴很熟 提交于 2019-11-28 04:48:43
问题 At work I can select multiple .xlsx files, and right clicking on one file will give me the option of combining the files to make a .pdf. Now I want to use the same functionality in one of my scripts. That is, selecting multiple files and send the paths of these files as arguments to a Python script. I've spent soon an hour searching for solutions, but I haven't found any good answers. It seems there are some C# answers, but I don't know how to convert the code to Python. Is it even possible

Configure Windows Explorer Folder Options through Powershell

荒凉一梦 提交于 2019-11-28 04:20:17
I'm looking for a way to configure a few options in Folder Option dialog of Windows Explorer through Powershell. The options are: Choose "Show hidden files, folders, and drives" Uncheck "Hide extensions for known file types" Uncheck "Hide protected operating system files (Recommended)" guyarad Keith's answer didn't work for me out of the box. The only thing that took to the registry value modification was ShowSuperHidden. Both the Hidden (Show hidden files...) and HideFileExt (hide file extension) reverted back to their previous values as soon as I opened the View tab in Folder Settings. Here

Can't see a file in Windows written by an Android app on SD card unless I “Force Close” the app

佐手、 提交于 2019-11-27 19:09:42
I wrote a file through my Android program like this: String file = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Files/hello.txt"; BufferedWriter writer = new BufferedWriter(new FileWriter(file)); writer.write(str + "\n"); \\ Yeah, 'str' has a value there writer.close(); The program does its job and it finishes. Now I hit the back button on Android to close the application. If I then go to an Android file browser (like Astro) I can see the file, but if I mount the SD card on Windows, I can't see the file! Now, if I go to Settings → Applications → Manage Applications → "Force

Opening an explorer window with designated file selected

你离开我真会死。 提交于 2019-11-27 18:08:11
问题 I have an application which has an option to show the selected file in the folder in which the file resides. My question is, how do I achieve this? To clarify, if a user in my program selected the "Test.txt" file, then I want a Windows Explorer window to pop up and highlight the file the user selected. You can see similar behavior in LimeWire and uTorrent. If you select a file in either of those programs and choose "Show in Folder", it pops up a Windows Explorer window with the file