windows-7

Debugging shell extension in Windows 7

青春壹個敷衍的年華 提交于 2020-01-12 03:14:06
问题 I'm trying to debug shell extension (IContextMenu) in Windows 7 with Visual C++ 2008. I have set DesktopProcess=1 in the registry and set host app to explorer.exe. But when I start the debugger, it launches explorer.exe and then detaches from the process. DllMain of the shell extension isn't called. The same code with exactly the same settings launched in debugger without any problems in Windows XP + Visual C++ 2008. Any thoughts how to debug the shell extension in Win7? 回答1: Try launching

Mixed ascii and unicode output from script - how to get command to output all as ascii?

老子叫甜甜 提交于 2020-01-11 13:14:13
问题 I have a script which is run from a service which is built using C++ and is not built using unicode. This program runs the script below and strangely, the output from the script running the wmic qfe list line seems to output as unicode. Sample output below. Here is the script: @echo off echo This text is output as standard - no spacing between characters >>C:\log.txt REM this one is output with 1 space between characters wmic qfe list >>C:\log.txt echo This text is also output as standard -

powershell apply new settings to taskbar

那年仲夏 提交于 2020-01-11 09:56:12
问题 I am playing around with powershell and am changing some taskbar settings by changing the registry key. For example i have written an autohide enable disable function. $autoHideSettingsPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"; $autoHideValueName = "Settings"; Function toggleAutohideRegistrySettings($enable) { $key = Get-ItemProperty -Path $autoHideSettingsPath -Name $autoHideValueName; Write-Host "key is: " + $key if($enable) { $key.$autoHIdeValueName[8] =

Windows 7 Explorer cannot sort files alphabetically

倾然丶 夕夏残阳落幕 提交于 2020-01-11 08:06:10
问题 I use sort by + name, and explorer cannot sort my files by name. How can they screw up something so easy? Is there any magic registry way to do this, here is the explorer output and dir output. I want the dir version of course. 回答1: Windows 7's sort is an absolute joke. The rubbish above about natural sorting is no excuse - I don't know anyone who would naturally sort "Back to the Future 3" before "Back to the Future" for example, and other languages existed pre Windows 7. The fix can be

creating vbscript to change defualt wallpaper on win7home machines

随声附和 提交于 2020-01-11 03:58:45
问题 Need help making this script true. i beleave the first part is done file, but registry needs to be reflected from information 4-8 thank you. 1 'this vbscript should be named DefualtWallpaper.vbs 2 'copy this file to a folder. 3 'cat.jpg image should be in same folder as vbscript. dim filesys set filesys=CreateObject("Scripting.FileSystemObject") If filesys.FileExists("%cd%\cat.jpg%") Then filesys.CopyFile "%cd%\cat.jpg%","%windir%\web\wallpaper\windows" 4.'change registry to new file Set

Command line photo printing in Windows 7

孤人 提交于 2020-01-10 20:09:10
问题 I need to print a photo (.jpg) from the command line in Windows 7. I have tried using lpr to no success, and found methods for Windows XP like the following: rundll32 shimgvw.dll ImageView_PrintTo /pt myPhoto.jpg "myPrinter" This doesn't work (not surprising), and my hours of Googling has turned up nothing else. I'm trying to find a stock way to do this on any Windows 7 machine without needing to install or set anything up. Does there exist such a command? 回答1: Maybe reformatting the command

Aero Snap not working for my application

限于喜欢 提交于 2020-01-10 14:31:58
问题 I have a problem with Aero Snap not working with the application I'm working on (Windows desktop, native C++ application), and I'm a bit confused as to what's happening, as it seems like it should just work, out of the box. I've used Spy++ on a mininal win32 application, and get the following messages when I press Win-Left: <00070> 00030D1C P WM_KEYDOWN nVirtKey:VK_LWIN cRepeat:1 ScanCode:5B fRepeat:0 fUp:0 <00071> 00030D1C P WM_KEYDOWN nVirtKey:VK_LWIN cRepeat:1 ScanCode:5B fRepeat:1 fUp:0

Customizing OpenFileDialog in .Net

≡放荡痞女 提交于 2020-01-10 03:52:45
问题 In need to create native looking customized .Net OpenFileDialog in Windows XP and Windows Vista/7. Add new controls to it, etc. Is there any way to customize standard OpenFileDialog in .Net (WPF specifically)? I've looked through the solutions like OpenFileDialogEx, but all that WINAPI hooking stuff is not acceptable for me. Maybe one knows a way to extract native dialogs via Reflection or something? How the native OpenFileDialog in Windows Vista/7 is implemented? Is it written in WPF? Thanks

Is there a simple way to handle Touch events like Flick in WPF4?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-10 03:09:25
问题 I'm building a windows 7 touch app and want to be able to handle touch gestures as simple events, specifically flicks. I can see windows responding, it pops up the icons as I flick but I can't seem to find an easy way to handle them. Something like grid.OnLeftFlick ... Am I missing something stupidly simple? Is there a toolkit or something I can use? Or, do I have to write my own listener? Thanks. 回答1: While WPF4 does support multi-touch, it does not have any built in gesture support, at

Wrong desktop shortcut icon on Windows 7 (Inno Setup)

孤人 提交于 2020-01-09 12:55:42
问题 I have created an installer with Inno Setup. The icon used for the desktop shortcut and start menu is embeded in the application executable. When the installer was initially created, I didn't have the final product icon from the design team. I used a temporary icon instead as I completed the installer. Everything worked as it should until I changed the icon for the final one. Now the desktop shortcut and start menu icons always display the old icon even though everywhere else the icon is