windows-explorer

How to tell if there's no default file extension association on OS post-Windows XP?

自作多情 提交于 2019-12-22 08:53:03
问题 Going back to the days of Windows XP one could use the following code to tell if there's no file association existed for an extension: TCHAR buffPath[MAX_PATH] = {0}; DWORD dwszBuffPath = MAX_PATH; HRESULT hR = ::AssocQueryString( ASSOCF_NOFIXUPS | ASSOCF_VERIFY, ASSOCSTR_EXECUTABLE, _T(".weirdassextension"), NULL, buffPath, &dwszBuffPath); if(hR != S_OK && hR != E_POINTER) { //Association does not exist } But since Windows 8, the AssocQueryString API returns S_OK and buffPath is set to

Manipulating the Windows 7 Explorer navigation pane

妖精的绣舞 提交于 2019-12-22 06:50:12
问题 Based on the answers I received at superuser, it's clear that I'll have to add the following to a custom Explorer Window launcher. I want to launch a rooted explorer view, and for just that window make the navigation pane look like the old Windows XP folders pane. I already wrote a program to place shortcuts to these folder views on the Start Menu, so changing the shortcuts to run through a launcher is trivial. Here's the XP folders pane: Here's the Windows 7 Navigation Pane: (source: 280z28

How can I set a file association from a custom file type to a program

亡梦爱人 提交于 2019-12-20 06:03:18
问题 Let's say I make a custom file that actually corresponds to what my program can read called "Bacon.dek". I can access it, modify it, etc. normally from my program, with only a few problems staying alive (fixing them at a relatively correct speed, too). Now, what I wanna do (and try to fix rather quickly once done), is actually choosing my file from Windows Explorer, right-clicking on it, and choose "Open with..." and choose my application. Or simply set my application as the default

Cannot drag and drop to debugged-application run from a privileged-run Visual Studio 2010

孤者浪人 提交于 2019-12-19 05:37:29
问题 I'm debugging my application which has drag-n-drop features in Visual Studio 2010. I have to run the IDE in privileged mode since some of my project required so. My problem: I can drag-drop when run the .exe file normally (run from Windows Explorer (WE)) but when debugging in VS2010 I cannot do drag-dropping between my app and WE. I tried to open WE in privileged mode but still cannot debug either. Do you have the same problem? If you do, do you have any work-around for it? Please share. 回答1:

C# adding context menu item to windows explorer for all file types

守給你的承諾、 提交于 2019-12-18 07:09:12
问题 I'm currently writing an application where I need to modify the context menu of windows explorer so that I can call a method within the application to be used on all files/folders that are seen in windows explorer. As there are already quite a few posts on stackoverflow (and also tutorials) on how to add the context menu for specific file types I know already that that is done usually by assigning the application to the right parts of the registry entry for those file types. As I don't want

How to refresh Windows Explorer

天涯浪子 提交于 2019-12-18 06:54:13
问题 A network volume's name can be changed. I changed the name to Spinal Disk To change a network name, I do Write new name in Registry. Attach my network volume using functions like DefineDosDeviceW. In this timing, Windows explorer read registry in my guessing. SHChangeNotify(SHCNE_DRIVEADD, SHCNF_PATH, root, NULL); // To be sure. SendMessageTimeout(HWND_BROADCAST, WM_DEVICECHANGE, message, (LPARAM)(&dbv), - SMTO_ABORTIFHUNG, 200, &dwResult); // To be sure again! It works, but sometimes doesn't

How to refresh Windows Explorer

女生的网名这么多〃 提交于 2019-12-18 06:52:51
问题 A network volume's name can be changed. I changed the name to Spinal Disk To change a network name, I do Write new name in Registry. Attach my network volume using functions like DefineDosDeviceW. In this timing, Windows explorer read registry in my guessing. SHChangeNotify(SHCNE_DRIVEADD, SHCNF_PATH, root, NULL); // To be sure. SendMessageTimeout(HWND_BROADCAST, WM_DEVICECHANGE, message, (LPARAM)(&dbv), - SMTO_ABORTIFHUNG, 200, &dwResult); // To be sure again! It works, but sometimes doesn't

Get Path in a ListBox of all Open Explorer Windows

两盒软妹~` 提交于 2019-12-18 04:47:07
问题 I want to list all open Windows Explorer windows with their active path in a ListBox . The app should refresh the ListBox if the explorer window is navigated to a different path. For e.g. two explorer windows are open. One is navigated to C:\Windows and the other is navigated to D:\Stuff . When the app it run, it adds C:\Windows and D:\Stuff to the ListBox . Then, the user navigates to a different folder in one of the open explorer windows like C:\Windows\system32 . The app should then

Windows Context menu shell icon

我们两清 提交于 2019-12-18 04:01:36
问题 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? 回答1: 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

Can you send a signal to Windows Explorer to make it refresh the systray icons?

跟風遠走 提交于 2019-12-17 10:42:43
问题 This problem has been afflicting me for quite a while and it's been really annoying. Every time I login after a reboot/power cycle the explorer takes some time to show up. I've taken the step of waiting for all the services to boot up and then I login, but it doesn't make any difference. The result is always the same: Some of the icons do not show up even if the applications have started. I've dug a bit on the code that makes one application "stick" an icon in there, but is there an API call