windows-explorer

Trying to get default web browser path fails on Windows 10

喜你入骨 提交于 2019-12-11 16:16:53
问题 I'm doing the following in my app's installer (note that the installer for this project is just a Windows executable ( setup.exe ) and not an MSI.) First I needed to check if there're file associations for .htm and .html file types. I did so already. And then if there's no association I needed to add them to be opened by a web browser. To make a lesser of an impact on a user's system, I thought to go with the user's default web browser. The question is how to find its path? So I was doing

How do I refresh a file's thumbnail in Windows Explorer?

醉酒当歌 提交于 2019-12-11 12:22:07
问题 Our Windows file server has an archive service installed that "stubs" files that have not been accessed for a defined period of time. When a request for the stubbed file is sent to the server, the archive service replaces the stub with the original document and serves it to the user. A major complaint about the archive service was that thumbnails for photos were no longer available. I decided to create a program in C# that would allow the user to select a folder and unstub all the files in it

log4net log file not visible in Windows explorer in application installation sub folder

荒凉一梦 提交于 2019-12-11 08:46:00
问题 I use log4net for my desktop application written in c# and deployed using Visual Studio Extension "Microsoft Visual Studio Installer Projects" (MSI-Installer). After installation I do not see the log subfolder defined for log4net. The TARGETDIR in " Microsoft Visual Studio Installer Projects " is defined as [ProgramFiles64Folder][Manufacturer]\[ProductName] . The log4net log file is defined as <appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net"> <param name="File"

How do I keep Windows Explorer from interfering with deleting a folder?

房东的猫 提交于 2019-12-11 07:46:19
问题 I've got a routine that deletes a folder and everything in it. After deleting all the files, the last thing it does is: if not Windows.RemoveDirectory(pname) then raise EInOutError.Create(SysErrorMessage(GetLastError)); Unfortunately, I tend to get an error from this if I have an open window in Windows Explorer displaying the folder. The error says the folder is not empty, which is not true. Is there any way to override this, perhaps forcing the window to close? In case it makes a difference,

Is there any layout which works like Windows Explorer?

∥☆過路亽.° 提交于 2019-12-10 20:42:58
问题 I would like to have layout manager which works like Windows Explorer in folder view (not any list view). What I need is something like this Marginal Layout panel like Windows 7 Explorer ListView in Swing. Is there any way to customize standard layouts or do you know any external layouts? 回答1: http://java-sl.com/tip_columns_flow_layout.html The link to screenshot and article about the code below import javax.swing.*; import javax.swing.border.EmptyBorder; import java.awt.*; public class

How to tell Windows Explorer to refresh its icons?

蹲街弑〆低调 提交于 2019-12-10 19:41:43
问题 Once my installer finishes installing new versions of my application's exe, I'd like to tell Explorer to use the new exe's icons for its shortcuts. However, I cannot figure out how to do this. From reading online, it looks like the problem is that the system image list is caching an old version of the icon. I tried calling SHChangeNotify with a SHCNE_UPDATEIMAGE parameter. I tried calling SHUpdateImage. I even tried the sledgehammer approach of broadcasting WM_SETTINGCHANGE . Nothing seems to

Open file with Windows' native program within C++ code

浪子不回头ぞ 提交于 2019-12-10 17:56:53
问题 My C++ program creates .png file and I need to open (view) this file right after creation - is there a way to open it as so it was opened within Windows explorer - so file wiil be opened with user's preferred program and if there are no associated programs with file's format - Windows will show dialog window in which user will be able to select any program to open that file. Crossplatform (+Linux, +MacOS, +BSD) solution will be perfect. Thanks. 回答1: On Windows, you can use the ShellExecute

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

血红的双手。 提交于 2019-12-10 12:49:59
问题 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 Windows 8.1 Pro, that maximum allowed file path size somehow seem to be 215 characters. So I'm curious are there any official guidelines for this? EDIT: OK, since posters below requested an API, I'm using SHFileOperation with FO_DELETE and FOF

Is there a Windows API to programmatically Cut / Copy / Paste files via Windows Explorer?

試著忘記壹切 提交于 2019-12-10 12:44:37
问题 I know that SHFileOperation can be used to perform file operatons with Windows Explorer, but it only performs complete file operations where both the source and destination are known. Is there an API that allows a application to cut, copy, or paste in Windows Explorer from an application? To answer a couple of questions: Using Windows Explorer to perform file/folder operations would greatly simplify moving multiple objects. This is particularly important for moving folders and their contents

Windows Explorer: How to create additional button?

白昼怎懂夜的黑 提交于 2019-12-10 11:59:17
问题 Explorer of Windows 7 uses a new light-blue bar with buttons like "Organize", "Share", "New Folder" etc. How can I create a new button ? Do I need to create a plugin for explorer.exe, and if, how do I do it (using Visual Studio .NET) ? Or is it a simple registry key I have to set which points to an exe or bat? Thanks in advance and best regards 回答1: It's a registry key, but not quite so simple. You have to do several steps to add one button. You may have noticed that the Win7 Explorer adjusts