windows-vista

Disabling progress bar animation on Vista Aero

天涯浪子 提交于 2019-12-17 19:48:44
问题 I'm using a Delphi 2009 VCL TProgressBar as a kind of "empty/full" gauge. On Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge. Is there any way of disabling this (NOT by adjusting user's theme settings!) to prevent the animation on this control? To clarify, I want something basically identical to the 'disk space used' meters in Windows Explorer. No animation, but still with a nice border and shading effects. Update: I

How to pass mouse events to applications behind mine in C#/Vista?

ぐ巨炮叔叔 提交于 2019-12-17 19:29:12
问题 I am writing a very specialized app in C# that floats as a mostly transparent window over the entire desktop. I want to be able to create and pass mouse events to applications behind mine, and have them appear to operate "normally", responding to those events. It would also be preferable if the window manager could respond. I am not a Windows guru, and am unsure of how to best accomplish this. From this page: http://bytes.com/forum/thread270002.html it would appear that mouse_event would be

Detecting Keyboard Hooks

你说的曾经没有我的故事 提交于 2019-12-17 19:19:01
问题 Is there a way to detect which programs or modules are listening to a keyboard hook? By Sysinternals maybe? 回答1: This blog post has instructions: http://zairon.wordpress.com/2006/12/06/any-application-defined-hook-procedure-on-my-machine/ 回答2: It largely depends on what level of abstraction are you obtaining your key presses. For maximum detection you could use hardware directly or go as low as possible (some hooks work at HW driver-level). For security purposes, you could also use a virtual

How do I make OpenSSL write the RANDFILE on Windows Vista?

[亡魂溺海] 提交于 2019-12-17 19:14:11
问题 When I run: openssl genrsa -out mykey.key 2048 I get the following error: unable to write 'random state' e is 65537 (0x10001) My googling suggests this is some kind of Vista permissions issue. How can I allow Vista to write this file or how can I configure openssl to get round it? 回答1: The root issue is that the RANDFILE variable in the OpenSSL configuration file is ignored on Windows. This has been a long-standing problem that continues to exist as of the OpenSSL v1.0a release, regardless of

Why is RegOpenKeyEx() returning error code 2 on Vista 64bit?

梦想与她 提交于 2019-12-17 16:01:14
问题 I was making the following call: result = RegOpenKeyEx(key, s, 0, KEY_READ, &key); (C++, Visual Studio 5, Vista 64bit). It is failing with error code 2 ("File not found") even though " regedit " shows that the key exists. This code has always worked on 32bit XP. Why is it "file not found" when it clearly is there? 回答1: I discovered that I could solve my problem using the flag: KEY_WOW64_64KEY , as in: result = RegOpenKeyEx(key, s, 0, KEY_READ|KEY_WOW64_64KEY, &key); For a full explanation: 32

As a developer, how should I use the special folders in Windows Vista (and Windows 7)?

混江龙づ霸主 提交于 2019-12-17 15:38:52
问题 Where should I save data related to my application? Where should I save configuration files? Where should I save temporary files? Should I do it in "Documents"? "AppData"? Etc... What is the best practice for saving data to the disk (I guess, best practice for special folders?!)? 回答1: ApplicationData : Everything that your application needs as "per user" data and does not fall under other categories. Standard configuration files would go here. CommonApplicationData : Everything that is not

Can I listen on a port (using HttpListener or other .NET code) on Vista without requiring administrator priveleges? [duplicate]

蹲街弑〆低调 提交于 2019-12-17 15:16:42
问题 This question already has answers here : HttpListener Access Denied (11 answers) Closed 3 years ago . I'm using HttpListener to allow a user to set up a proxy on a user-defined port. When I start the HttpListener, I get an exception if the application isn't running under administrator privileges in Vista. From what I've read, this is expected behavior - administrator privileges are required to start listening on a port. But I'm sure there are ways around this, as I run plenty of programs

Process.Start with different credentials with UAC on

£可爱£侵袭症+ 提交于 2019-12-17 10:43:07
问题 I am trying to start another process with Process.Start running under different credentials with the UAC turned on. I get the following error: System.ComponentModel.Win32Exception: Logon failure: user account restriction. Possible reasons are blank passwords not allowed, logon hour restrictions, or a policy restriction has been enforced at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start

Running compiled python (py2exe) as administrator in Vista

冷暖自知 提交于 2019-12-17 06:13:26
问题 Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista? Some more clarification: I have written a program that modifies the windows hosts file (c:\Windows\system32\drivers\etc\hosts) in Vista the program will not run and will fail with an exception unless you right-click and run as administrator even when the user has administrator privileges, unlike in XP where it will run if the user has administration rights, so I need a way to elevate it to the

Request Windows Vista UAC elevation if path is protected?

冷暖自知 提交于 2019-12-17 04:31:20
问题 For my C# app, I don't want to always prompt for elevation on application start, but if they choose an output path that is UAC protected then I need to request elevation. So, how do I check if a path is UAC protected and then how do I request elevation mid-execution? 回答1: The best way to detect if they are unable to perform an action is to attempt it and catch the UnauthorizedAccessException . However as @DannySmurf correctly points out you can only elevate a COM object or separate process.