windows-7

Finding USB serial ports from a .NET application under Windows 7

家住魔仙堡 提交于 2019-12-30 05:01:08
问题 I have an application that looks for a specific FTDI serial port with customised USB descriptors. My current code uses the example from Code Project, which searches the MSSerial_PortName WMI table under root\WMI , and pulls out extra USB information from root\CIMV2\WIN32_PnPEntity . This worked well under XP, but the application must also run under a standard user onWindows 7. In this environment access of root\WMI results in an "Access Denied" ManagementException . Can anybody suggest a way

Building minimal cython file with python 3.3 (Anaconda) under windows 7

≯℡__Kan透↙ 提交于 2019-12-30 04:37:05
问题 When I try to build a minimal Cython file test.pyx with Python 3.3 (Anaconda 3) under windows 7, I obtain a strange error: C:\Users\myname\Test_cython>python setup.py build running build running build_ext error: [WinError 2] The system cannot find the file specified Of course test.pyx is in the working directory. It works fine under windows with Python 2.7 (Anaconda) and under Linux with Python 2 and 3. What could be the problem here with Python 3.3 (Anaconda 3)? Thanks The file setup.py:

How to always show program tray icons in Windows by *default*?

元气小坏坏 提交于 2019-12-30 04:21:21
问题 If a program is executed for the first time in Windows 7, it automatically hides the icon. Is there any manifest setting or option to force Windows 7 to always show the icon by default? 回答1: In .NET Rocks podcast, not long time ago, Kate Gregory from Microsoft was saying that it is impossible. She said something like: "If user wants it (tray icon) he/she will put it there". Reason for this is to prevent mess in the tray area. 回答2: If you really want to show your tray-icon, you can popup a

dpinst / DifX won't install signed driver silently

我们两清 提交于 2019-12-30 03:24:04
问题 When installing a signed driver (i.e. with a properly signed .CAB) on Windows 7 through DpInst, unless it's a WHQL-signed driver, you cannot install it silently. If you run DpInst in the non-silent mode, it'll prompt you to trust the "publisher". If you run DpInst in silent mode, it would fail with a signing-related error code (something like 0x800b0109 -- check your setupapi.app.log). 回答1: While ilya's answer is good, the solution on Windows 7 is even easier. The command below deploys the

call notify balloon message in windows 7 from cmd?

北城以北 提交于 2019-12-30 03:11:07
问题 I need to create a notification balloon message in Windows 7 from the Command prompt with custom text. I have searched Google and found shell32. 回答1: This can be done in Powershell: throw an icon ( .ico file) in a c:\temp directory or point that somewhere else. [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") $objBalloon = New-Object System.Windows.Forms.NotifyIcon $objBalloon.Icon = "C:\temp\Folder.ico" # You can use the value Info, Warning, Error $objBalloon

How do I add my application in the Default Programs list of Windows Vista/7?

僤鯓⒐⒋嵵緔 提交于 2019-12-30 02:20:14
问题 So many programs feature a list of possible extensions and protocols under the "Default Programs" control panel applet. "Set Default PRograms", more precisely. (Vista & 7) I wish to add my programs in that list and set some extensions that it can handle. One more thing. My program supports addons for opening more files, so that list should be dynamic (I can add more extensions or even protocols at any time) By the way, yes, I know, this is not exactly a programming question. It'd be my humble

How can I detect wallpaper changing as a result of the Windows 7 slideshow?

半城伤御伤魂 提交于 2019-12-30 01:37:51
问题 I am writing a program that needs to know when the desktop wallpaper changes. After some searching, I found a partial solution: http://www.neowin.net/forum/topic/567779-net-detect-wallpaper-change/ Essentially, it says to listen for the WM_SETTINGCHANGE message, and check the wallpaper. Unfortunately, this message does not appear to be sent when the wallpaper is changed as a result of the Windows 7 wallpaper slideshow. In fact, no message seems to be sent to my application at all for this

Incorporating the Windows 7 onscreen keyboard into a WPF app

心已入冬 提交于 2019-12-30 00:40:09
问题 Windows 7 has a really nice onscreen keyboard program/control for touchscreens. I have a touchscreen app that was originally written for, and will be deployed on, XP. Is it possible to incorporate this keyboard directly into my app, rather than me using a custom control? I can find no programmatic information about it, so any links would be very helpful. Specifically, I'd need: To be able to use the keyboard on an XP machine that will have .NET 3.5 sp1 installed on it. To be able to hide the

IAudioSessionNotification, anyone have working code?

谁说我不能喝 提交于 2019-12-29 08:40:10
问题 I'm picking up some experimental code I was messing with in the Windows 7 Beta now that I've installed the RC. Basically, I'm trying to get IAudioSessionManager2 & IAudioSessionNotification working together to inform my little app of every new audio session created. Punchline code in AudioListener (public IAudioSessionNotification): //This is mostly lifted from MSDN HRESULT STDMETHODCALLTYPE AudioListener::QueryInterface(REFIID riid, void** ppvObject) { if(riid == __uuidof(IUnknown)) {

NamedPipeClientStream can not access to NamedPipeServerStream under session 0

筅森魡賤 提交于 2019-12-29 07:25:07
问题 I have NamedPipeClientStream which connects to NamedPipeServerStream. They exchange a couple of messages, and then NamedPipeClientStream closing, while NamedPipeServerStream recreated and continue listening for the client pipes. (I couldn't make a working async Server Pipe, so this is some kind of dog-nail) The client-server interaction works fine during my client's streams launched from normal user sessions. But there are a situation when Client pipe is launched from session 0 on Win7 and