November 18th, 2007

You are currently browsing the articles from MS Windows Articles, Reviews and Videos written on November 18th, 2007.

SetThreadPriority, Vista, and Autostart Locations

I ran across a post on the Vista Compatibility Team Blog entitled "SetThreadPriority from Run key" that discusses a change in Vista whereby calling SetThreadPriority from an application launched from the Startup folder and the "Run" key in the registry will not cause the thread's priority to be increased.

Wanting to verify and play around with this, I wrote a simple program that called SetThreadPriority to set the priority of the thread to THREAD_PRIORITY_HIGHEST. The program then immediately called GetThreadPriority to determine if the call to SetThreadPriority had any effect. Next, in a loop, the program then called SetThreadPriority / GetThreadPriority until either an error was encountered, or GetThreadPriority returned the expected priority. The program logged before and after each call to SetThreadPriority / GetThreadPriority the time, the action, and the either the parameters or the return value.

I set the program to be launched automatically by placing a shortcut in the "Startup" folder, and rebooted. Once the system came back up, I waited a bit and then examined the log. The first call to SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_HIGHEST ); returned TRUE. The first call to GetThreadPriority( GetCurrentThread() ); returned 0 indicating THREAD_PRIORITY_NORMAL. In other words, the call to SetThreadPriority had succeeded, but the priority of the thread remained unchanged. The calls to SetThreadPriority and GetThreadPriority in the loop were identical, and returned identical values. That is, until about 45 seconds into the program's execution, when the call to GetThreadPriority returned 2, indicating that the priority of the thread was THREAD_PRIORITY_HIGHEST. This matches what is mentioned in the "SetThreadPriority from Run key" blog entry, where it is stated that:

it is for about a minute or so after which the call to SetThreadPriority(THREAD_PRIORITY_HIGHEST ) will actually succeed in bumping up its priority level.

I repeated the same tests, using THREAD_PRIORITY_ABOVE_NORMAL in the call to SetThreadPriority, with the same results.

I also used THREAD_PRIORITY_BELOW_NORMAL in the call to SetThreadPriority as well as THREAD_PRIORITY_LOWEST; in these cases, the call indicated success and GetThreadPriority confirmed the change in priority immediately.

The next set of tests removed the call to SetThreadPriority in the loop - just the initial call to SetThreadPriority was made. The return indicated success, but the call to GetThreadPriority returned THREAD_PRIORITY_NORMAL for many minutes; as the loop was a tight loop, I terminated the process once it became apparent that there truly would be no change to the priority of the thread. This means that requests to increase the priority are not queued up or held for later processing. The call to increase priority indicates success, the priority is not changed, and unless the thread checks, it is none the wiser.

One other thing that I thought of trying was to see what happened when a thread in a process spawned by an "autostart" process called SetThreadPriority, as above. To do so, I modified the original program to accept a command-line parameter indicating that it should spawn another instance of itself. The thread in the spawned process behaved identically to the thread in the "autostart" process; this persisted 3 "levels" deep ("autostart" instance spawns instance x, which spawns instance y), which is as deep as I tried. The Vista Compatibility Team Blog entry only mentions the Startup folder and the "Run" key as being affected by this, but I wonder if other things may be affected. It is interesting (and a good thing!) that there is a mechanism in place to cause this behavior to affect processes spawned by autostart processes (otherwise, the "protection" offered by this feature is easily defeated).

As a last test, I invoked the test program manually as quickly as I could while Vista was still processing the login. The first attempt to change the priority of the thread succeeded, and the first call to GetThreadPriority confirmed the priority change. At the same time, Vista was processing the autostart instance of the program, which behaved as it had previously when started automatically. So there is not a blanket ban on priority boosting in the first minute or so - how a program is started truly affects what it can do.

»

Written by «/\/\Ø|ö±ò\/»®© on November 18th, 2007 with comments disabled.
Read more articles on GetThreadPriority and SetThreadPriority and autostart and priorities and run and startup and threads and vista.

Test Drive Vista without installing it.

I know many of you have heard the good and bad about Vista, but do not want to risk a machine by installing it. Microsoft feels your pain, and has a new website dedicated to giving Vista a spin without any of the trouble.

Windows Vista Ultimate Test Drive

First you have the Windows Vista Ultimate Test Drive. It has almost 20 videos that walk you through these features and functionality of Vista. Click on any of them below.

-Schedule Automatic Backups

-Restore Your Old Files

-Browse with Enhanced Security

-Better Protection From Maleware

-Built In Diagnostics

-Instantly Search and Find Information

-Document Explorer and Live Icons

-Using the Windows Sidebar and Gadgets

-Improved and Automated Help Options

-Set Up and Connect to Networks with Simplicity

-Internet Explorer 7: Printing Advances

-Easily Manage your data synchronization

-Improve your PC's power Management

-Collaborate in Small Groups Anywhere, Anytime

-One Place to Fax and Scan your Documents

-Easy To Use, Built-In Email Application

-Manage your time with Confidence

-Organize and Share your Digital Images

In addition, Microsoft is providing a Virtual PC file with a 30 day trial of Vista Ultimate. You can find it here

And, finally the best option is the actual test drive of Vista in a web session that feels a lot like remote desktop.

You can try it out by visiting this site
Check out our Windows Admin Tools

Written by Steve Wiseman on November 18th, 2007 with comments disabled.
Read more articles on Uncategorized.

Don’t give up on Vista

Another Mac vs PC add, this one mentioning people going back to XP, or having to buy new peripherals. They are certainly seeming more hypocritical with Leopard having so many issues.

Written by Joe on November 18th, 2007 with comments disabled.
Read more articles on Apple and Commercial and Videos.

Increasing shutdown speed by reducing wait times

Windows XP stores a couple of values in its registry which are responsible for determining how long to wait before shutting down (killing) open applications and services once the shutdown command has been given.

By editing these two settings and changing them to lower values, you can considerably decrease the amount of time that Windows XP needs to successfully shut itself down. The first part of this tweak deals with setting the amount of time Windows will take to kill open applications on shutdown. (more…)

, , , , , , , , ,

Written by Jason on November 18th, 2007 with comments disabled.
Read more articles on Windows XP and Xp and control panel desktop and hkey current user and hkey local machine and open regedit and shut down and shutdown command and tweak and windows.

There’s Nothing Wrong with Windows Vista

Chris Pirillo says “I’m so tired of people saying that the problems are with Vista, instead of blaming themselves! I mean seriously. It’s not Vista’s fault you buy crappy hardware. It’s not Vist …”

Written by Joe on November 18th, 2007 with comments disabled.
Read more articles on Videos.

Free PowerShell Cmdlets for Group Policy

Group Policy MVP Darren Mar-Elia has released some new PS cmdlets for handling Group Policy Objects using PowerShell.

Check them out here:
http://www.gpoguy.com/powershell.htm

I hope you’ll like it!
/Jakob

Written by Jakob H. Heidelberg on November 18th, 2007 with comments disabled.
Read more articles on Uncategorized.

Keep Windows operating data in main memory

Windows XP contains several tweakable memory settings in the registry, one of which is the DisablePagingExecutive registry key. This controls whether the operating system will transfer its essential driver and kernel files to the ‘virtual memory’ (the page file on the hard disk). It defaults to allowing this.

Obviously, transferring portions of the system to hard drive memory can considerably slow things down, and it appears that Windows XP does this periodically, whether or not the system is actually low on physical memory (RAM).

If you have 256MB of system memory or more, try this registry tweak to force Windows to keep its operating data in main memory: (more…)

, , , , , , , , , , , , ,

Written by Jason on November 18th, 2007 with comments disabled.
Read more articles on Windows XP and Xp and drive memory and hkey local machine and main memory and memory management and memory ram and memory settings and open regedit and physical memory and registry tweak and system memory and virtual memory and windows.

Speeding up your PC for XP

Here’s a simple tip to clean your system in seconds.

This works only for Windows XP

On your desktop, create a new shortcut and instead of browsing for a file, write down this shortcut-

%windir%system32rundll32.exe advapi32.dll,ProcessIdleTasks

Click Next - and name it “Whatever you want(literally)”.

And then open the shortcut when ever you feel that your system is running low on resources.

, , , , , , , ,

Written by Jason on November 18th, 2007 with comments disabled.
Read more articles on PC and Windows XP and Xp and dll and literally and shortcut and speed and windir and windows.