Problem
Language: C# 2.0 or later
I would like to register context handlers to create menues when the user right clicks certain files (in my case *.eic). What is the procedure to register, unregister (clean up) and handle events (clicks) from these menues?
I have a clue it's something to do with the windows registry, but considering...
I'm trying to use tasklist to find out which process is consuming more than X percent of my CPU (to later kill it with taskkill.)
How do I know what percent does a time format represents?
The documentations says:
TASKLIST options
/FI filter
And one filter may be:
CPUTIME eq, ne, gt, lt, ge, le CPU...
Hi,
I want to extract the Icon/Thumbnail (different size) of a file from
windows shell on my project. I am able to extract the thumbnail with
out any issue, but the problem came when working with files that don't
have thumbnail view. The issue is I am not able to get the bitmap as
the windows explorer shows. I am getting a black color wh...
I need to add the "Run when Windows starts" option to my program CintaNotes, but do not want to sacrifice the "cleanness" of it: it is a 100% portable freeware and should not leave traces in the system.
I've come up with the idea to autodetect running from the Startup shortcut and automatically minimizing to the system tray. Is there a w...
In the windows shell:
echo "foo bar" | find "foo"
succeeds (i.e. errorlevel = 0). However, I want a script that fails (i.e. errorlevel <> 0) when it finds a particular word in some input text. Any ideas?
...
As a dev I normally group my explorer detail view by file type. This way all the config files, assemblies, executables etc are grouped and ready to be copied, just by clicking its group header to select all related files.
In beta build 7000 one could hold Ctrl and select many groups to select all the related files.
IMO since RC build 7...
The usual way to resolve lnk involve using WShell.WshShortcut or IShellLink that way :
var WshShell = WScript.CreateObject("WScript.Shell");
var oShellLink = WshShell.CreateShortcut(strDesktop + "\\some-shortcut.lnk");
WScript.Echo(oShellLink.TargetPath)
But there are links that can't be resolved that way : the resolution end up in c:...
Hi,
There are several approaches to fetch the description and default icon for a given extension (no full path), e.g for "*.doc" I want to get "Microsoft Word Document" and the related icon, which do you think will be the fastest one of the following:
Search the registry:
in registry, go to "HKCR.{extension}", read the default valu...
You can add a new item to the 'Send To' Windows explorer menu by creating an application shortcut in the SendTo folder contained in the user's profile folder e.g. C:\Documents and Settings\Username\SendTo\
But how do you add a 'Send To' menu item that will be available to all users without having to add it to every user's profile folder...
I am trying to use SHGetFolderPath() to determine the path of the user profiles folder. The documentation states that CSIDL_PROFILES defines this folder:
CSIDL_PROFILES (0x003e)
Version 6.0. The file system directory containing user profile folders. A typical path is C:\Documents and Settings.
I am using Visual Studio 2005 SP1, and I c...
I want to get the system icon of a specified folder, but maybe the only way to retrieve the icon is to use SHGetFileInfo() method. The first parameter of SHGetFileInfo() method is a pointer of LPITEMIDLIST. If I only have the absolute path of the folder, how can I get the pointer according to the path?
Thank you very much!
...
After reading a file properties in code in a fashion similar to this, I go to the file in question using Windows Explorer and can't read the file summary properties. Am I missing something in my code? How do I release file handles possibly held by the Shell object?
...
Windows explorer has the ability to show thumbnails of files. These thumbnails are provided by core and third-party shell extensions.
I know how to extend the shell to provide thumbnails to Windows.
What I want to do is retrieve the thumbnail image from any file on the system via the shell using C#. Is this possible?
Essentially, I'm ...
Shell explorer on Windows define global objects such as ::{2559a1f4-21d7-11d4-bdaf-00c04f60b9f0 which is a link to the user "internet browser". I got these value from a shortcut that is drag&dropped over my application, but I can't find how to use it to open it...
I'd like to get information about what this object is too.
Does someo...
I'm building a kind of dock, and I struggle at finding how to save things like "Run", "Search", "Help", "Printers" and reopen them after that.
I tried this :
CComPtr<IShellFolder> pDF;
SHGetDesktopFolder(&pDF);
LPITEMIDLIST pidlPrintersAndFaxes=0;
hr=pDF->ParseDisplayName(0, 0, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3...
Hi,
I have a namespace extension that supports copy-paste using the CFSTR_FILEDESCRIPTOR/ CFSTR_FILECONTENTS to copy virtual files to the clipboard. However, the 'Copying Files...' progress dialog does not show up.
Explorer appears to hang until the copy operation is complete.
Any suggestions as to how to get the progress dialog to w...
Apparently, there's a fairly easy way to host Explorer in your app starting with Vista:
http://www.codeproject.com/KB/vista/ExplorerBrowser.aspx
However, that interface is only available starting with Vista.
I see that there is another way to do it: "going all the way back to 95, but it requires more work - implement IExplorerBrowser a...
I am attempting to implement an IShellBrowser. One method of such is:
HRESULT STDMETHODCALLTYPE IShellBrowser::QueryActiveShellView(/* [out] */ __RPC__deref_out_opt IShellView **ppshv)
This gets the active shell view pointer for the caller (in my case, there is only one shell view at any given time).
But it is very unclear whether I...
Short of writing a function manually that translates a few known REFIID to names, such as:
if (riid == IID_IUnknown) return "IUnknown";
if (riid == IID_IShellBrowser) return "IShellBrowser";
...
Is there a system call that would return a reasonable debugging string for well-known (or even all) REFIIDs?
...
I'm trying to roll my own implementation of IShellBrowser because I need to have a more full-featured File Open and Save As dialog than Windows allows that is compatible with XP (and ideally with W2000)*
At this point I need to add the standard toolbar that you see in upper right of the dialog (manifest styles for XP and earlier) - a ba...