windows-vista

Why is console output so slow?

人盡茶涼 提交于 2019-12-05 21:58:31
问题 So I have noticed this while using a few differnt languages on Windows XP, Vista and 7. If you dump a couple thousand lines a second to the console window it generally has a negative impact on the performance of the system. Computer are fast, and always faster, and the console looks like just some text on a back ground. Where is the bottle neck? 回答1: printf etc has to go from your process with some sort of IPC to the Console window process (csrss or conhost) The console can also be shared

Show UAC prompt when launching an app

拥有回忆 提交于 2019-12-05 21:52:05
I have an app which needs administrator privileges to do some things. I'd like to just show the UAC prompt when it starts, and then be elevated. I'm not sure how to do this, but I'm hearing about things like manifests and whatnot but not seeing a plain answer anywhere. You need an app manifest that demands elevated privileges. Here's a quote from a blog that answers this: First, you can create a manifest file by adding an “Application Manifest File” Item to your project (default name: app.manifest), then you can set it through the Application Tab in the Project Properties. If you want to

How do I Access File Properties on Windows Vista with Python?

社会主义新天地 提交于 2019-12-05 21:48:29
The question is as simple as in the title, how do I access windows file properties like date-modifed, and more specifically tags, with Python? For a program I'm doing, I need to get lists of all the tags on various files in a particular folder, and I'm not sure on how to do this. I have the win32 module, but I don't see what I need. Thanks guys, for the quick responses, however, the main stat I need from the files is the tags attribute now included in windows vista, and unfortunately, that isn't included in the os.stat and stat modules. Thank you though, as I did need this data, too, but it

Forcing my MFC app to run as Administrator on Vista

天涯浪子 提交于 2019-12-05 21:02:46
I have an MFC app built using Visual Studio 2008 and it needs to run on W2K, XP, 2003 and Vista. The application writes to HKLM in the registry and will only work on Vista if you run it as Administrator. My question is: can I force the app to run as Adminstrator automatically? Does it involve creating a manifest file? At the moment I have the following in stdafx.h which I guess creates a manifest file on the fly: #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df'

How To Get My Solutions Into Windows Problemm Reports and Solutions

亡梦爱人 提交于 2019-12-05 20:30:12
Windows Vista added a Problem Reports and Solutions facility that records software problems, reports them to Microsoft, and then say they collect and make solutions to those problems available to users. So when my program hits a bug and crashes, the user gets an exception report: (source: beholdgenealogy.com ) This then gets captured by Windows as one of it's problems. Every so often Windows warns the user that they've had problems and asks if they want to look for solutions. It brings up the Problem Reports and Solutions windows: (source: beholdgenealogy.com ) So then you click on the "Check

CreateDesktop() with Vista UAC (C Windows)

邮差的信 提交于 2019-12-05 20:08:54
I'm using CreateDesktop() to create a temporary desktop where an application will run, perform a cleanup action (while remaining out of the way) and terminate. I'm closing that desktop once the application is gone. Everything is fine when using Windows XP and even Vista. The problem arises when you enable the (annoying) UAC. Everything is OK when you create a desktop, but when you call CreateProcess() to open a program on that desktop it causes the opened application to crash with an exception on User32.dll. I've been reading a lot about the different desktops and layers on Windows and the

FileSystemWatcher not monitoring local user folder or temporary internet files folder in Vista (64bit)

雨燕双飞 提交于 2019-12-05 19:56:41
I wrote a test program to monitor my Picture folder which points to c:\users[username]\Pictures and temporary internet files folder for the same user. This is program works perfectly fine if I change the folder to other location like d:\persona_pics. Any idea why events are not being raised when I set the mentioned folder to monitor? here is the code. class Program { static void Main(string[] args) { //FileSystemWatcher myJpegFileWatcher = new FileSystemWatcher(@"C:\Users\[username]\AppData\Local\Microsoft\Windows\Temporary Internet Files\low\content.ie5\"); FileSystemWatcher myJpegFileWatcher

Start Java Runtime Process with Administrator rights on Vista

本秂侑毒 提交于 2019-12-05 18:43:27
i want to execute a setup.exe installer which installes a software on vista with java 1.6. The user is not an administrator. When i try to start the process i get the error message: CreateProcess error=740 which indicates, that the user has not enough rights for starting the process. Can i submit a flag or an option to indicate, the the process should execute with administrator rights? Vista itself does have this functionality inside the menu toolbar. Can i use this function in Java. I call the following code Runtime rt = Runtime.getRuntime(); Process process; try { String fileToExecute = new

Is UAC on Win7 different than Vista?

两盒软妹~` 提交于 2019-12-05 17:25:44
[EDITED to avoid duplications] I posted this question and in trying to diagnose what is going on have become curious about the magic UAC that happens in the OS. (especially since it seems different on the two platforms. Can anyone confirm or refute this? Our unmanaged c++ program causes the "Do you want to allow the following program to make changes to this computer?" to pop up at program start - even before it gets to our winmain. It appears that there is some kind of test done by the PE loader/launcher/whatever before our app code runs that decides for itself if it should ask for elevation.

Executable Jars running very slowly

自古美人都是妖i 提交于 2019-12-05 17:19:30
I've done several projects and packaged them into jar files, but I've noticed that my jar files run much more slowly than in my IDE. I use Eclipse to compile and run my programs. In Eclipse, I have everything working. When I package my project as a runnable Jar and execute it by double-clicking, everything still works. But when I have animation, the program runs extremely slowly. Instead of 30 frames per second in Eclipse, I now get about 2 frames per second. The animation is very laggy. Interesting thing is, when I run the same Jar from the command prompt ( java -jar MyCode.jar ), the lag