Geek Noise
Rants, rambles, news and notes by Peter Provost
04

Another One Bites the Dust

Monday, 4 August 2008 08:46 by Peter Provost

On Friday I repaved my laptop again. As many of you know, I do this about every 6-8 weeks, but now that I return to Redmond once a month, I’ve started aligning my repaves with my trips to take advantage of the corporate PXE installation services. This one was after two trips, which was about 8 or 9 weeks.

It is amazing how fast I’m getting at this. The more you do it, the more you organize yourself to make it easy, the easier it gets.

Within three hours I had my machine back to usable. In the few days since then I’ve installed things as I’ve needed them, using my previous repave notes as a guide for things I might’ve forgotten.

Here’s the list this time (so far):

  • IT Supported Vista SP1 x86 + Office + eTrust
  • Configure Bluetooth Mouse
  • ISA Firewall Client
  • Office Communicator
  • Configure Consolas as System Font
  • Wow
  • Flash Player for IE
  • Ventrilo 3.0.1
  • Zune Player
  • HotKeyPlus
  • Firefox 3.1
  • Java Runtime
  • Powershell 1.0 for Vista
  • Sidebar plugins:
    • All CPU Meter
    • Wired Network Meter
    • Wireless Network Meter
    • Woot!
  • NcFTP
  • PasswordMinder
  • GnuWin32
  • Chatzilla
  • Live Messenger
  • Vim 7.1
  • 7zip
  • ctrl2cap
  • LiveWriter Technical Preview
  • Flash Player for Firefox
  • Firefox Profile
  • Launch and Setup Outlook
  • ooVoo
  • My Profile Stuff (Desktop, Docs, Music, etc.)
  • Adobe Acrobat Reader
  • Twhirl

I blogged about this process once before over here: Another Agile Computer Repave Done

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (2) | Comment RSSRSS comment feed
20

Mount an ISO in Vista

Friday, 20 June 2008 06:48 by Peter Provost

I used to use the Microsoft Virtual CD-ROM tool, but the public one doesn't work in Vista. I also used Daemon Tools, but apparently it now bundles some SpyWare so I won't touch it.

After a bit of digging today, I found this: Mount and ISO Image in Windows Vista :: the How-To Geek

It works perfectly and is free.

PS. I still don't understand why this isn't baked into the OS, but it isn't.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed
20

Speeding Up Vista Boot Time

Friday, 20 June 2008 06:06 by Peter Provost

UPDATE Oct-02 2008:
Apparently this is misleading at best, and at worst wrong. Here is what has been explained to me: The setting adjusted in Step 3 below can only LIMIT the number of processors available to Windows. And if the box is unchecked, it will use the default which is ALL of your processors. Makes sense when I think about it. So as long as that box is unchecked, you are using all your procs. As was said to me: “You can easily check this by setting all those things, rebooting the machine and looking at the performance tab in task manager. It will show you how many cores the system sees.” Thanks to everyone who cleared this up!

Found this little gem while looking for something else... thought I'd share it.

When you have a computer with a recent model CPU, chances are it's a dual-core CPU. Both Intel & AMD have been producing dual core CPU's for a few years now. By default, Windows Vista will only use a single core during boot-up. You can easily change this from the System Configuration utility:

  1. In Vista's Start Search type msconfig & hit the [Enter] key on your keyboard
  2. Once System Configuration has started, select the Boot tab and click the Advanced Options button
    image
  3. In the BOOT Advanced Options dialog, check the "Number of processors" check box, and choose 2 (or 4 if you have quad core) for the number of processors.
    image
  4. Click OK twice.

Done and done. :)

Currently rated 2.6 by 63 people

  • Currently 2.587299/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (2) | Comment RSSRSS comment feed
11

Silly Vista Features I Want

Thursday, 11 October 2007 07:47 by Peter Provost

I enjoy Windows Vista. I really do. But I'm also a keyboard junkie (despite being a poor typer). For years I've found myself wanting to cut people's mouse cords when I see them doing things that could be 100x faster by hitting the right keystroke.

As a Vista + Keyboard guy, however, I find that I want a few things that aren't there.

Quick Launch Shortcut Overlays

I love the Quick Launch bar. Why? Because I love that WIN+# runs the program in that numbered "slot" in the bar. So, WIN+1 runs the first, WIN+2 the second, and so on.

But after about three or four buttons on that bar, I have to count them to see which number to press, which sucks. I'd like nice little overlays that show the number. Something like this:

MyQuickLaunchBar

Ahh... much better.

Address Bar Shortcut Keys

I've seen a lot of people who know about putting the address bar on their Windows Task Bar. It is nice, you can quickly type or paste a URL or local file address and it will popup an IE or Explorer window showing that address. Kinda cool, but I can't seem to figure out how to get the cursor there without reaching over for my mouse.

Boo!

UPDATE: As I was writing this post, I realized that in Vista I don't need this feature, or even that address bar on my screen. I can just hit the Windows key and start typing and it will do exactly what I wanted. DUH! I knew that! But still... why can't I get there with a simple shortcut key?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
25

Powershell Sudo (sort of) for Vista UAC -- REDUX

Sunday, 25 February 2007 13:08 by Peter Provost

Okay, after the email from Wes this morning I spent some of the time on the plane today re-doing my UAC privilege elevation stuff... this time in pure Powershell script.

As expected, it is quite simple:

function elevate {
$file = $args[0]; $param = "";
for($i=1;$i -lt $args.Length; $i++) { $param += $args[$i] + " "; }
$psi = new-object "System.Diagnostics.ProcessStartInfo"
$psi.FileName = $file; $psi.Arguments = $param; $psi.Verb = "runas";
[System.Diagnostics.Process]::Start($psi)
}

Now if only I could figure out how to have something like the Ruby "..." catch-all parameter, I could get rid of all that for-loop crap.

UPDATE 2007-02-26: I just posted a newer version of the elevate function that doesn't have the for-loop. Use that one instead.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , ,
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed
24

Powershell Sudo (sort of) for Vista UAC

Saturday, 24 February 2007 13:46 by Peter Provost
UPDATE 2007-02-25 0815am:

Wes Haggard sent me an email this morning that caused me to "slap myself upside the head":

Why got through this trouble when you can just user Process.Start?

PS> $psi = new-object System.Diagnostics.ProcessStartInfo "notepad.exe"
PS> $psi.Verb = "runas"
PS> [System.Diagnostics.Process]::Start($psi)

Oops. My bad. Hahaha... can't believe I didn't try that. :)

I've been running with a Least-Privileged User (aka LUA) account for years on Windows XP. I was quite excited to get onto Vista w/ its UAC stuff built-in.

But then I discovered that as so often happens, they forgot those of us who like to use command shells. Now, you know that I love Powershell. I think it is one of the coolest developer innovations out of Microsoft in years. (To be honest, I'm surprised the Java and Ruby camps didn't come up with the idea first, but I'm glad they didn't. But I digress...)

Anyway... I like running in my Powershell window. I have one open always. I have lots of functions, aliases and other stuff that do work for me. I love it.

Believe it or not, out of the box there is no way to say "Run as Administrator" in the UAC way. You can use runas.exe but that will prompt you for a complete username/password set instead of using your UAC elevation settings. I knew there had to be a way to do it from code, but my first 30 second search a few weeks ago didn't turn up the answer so I put it aside. After a bit of digging today though, I discovered that you can accomplish this by simply calling ::ShellExecute with the little known and poorly (un)documented verb "runas".

In other words, a C++ Win32 program could do this...

::ShellExecute( NULL, "runas", "notepad.exe", NULL, NULL, SW_SHOWNORMAL );

...and Notepad would be run using UAC privilege elevation on Windows Vista. Right on. Seems like only a little bit of work should be required to turn this into a Powershell Cmdlet and I would have it right at my fingertips.

Here's the code. It is pretty self-explanatory. I went ahead and made the verb be a Cmdlet parameter so you can control it, and set the default to "open". Then to elevate in Powershell, I just pass the '-verb runas' option.

[Cmdlet("start", "process", SupportsShouldProcess = true)]
public class StartProcessCmdlet : Cmdlet
{
private string _process = String.Empty;
private string[] _arguments = { };
private string _verb = "open";
[Parameter(Position = 0,
Mandatory = true,
ValueFromPipeline=true,
HelpMessage = "The name of the process to start.")]
[ValidateNotNullOrEmpty]
public string Process
{
get { return _process; }
set { _process = value; }
}
[Parameter(Position = 1,
Mandatory = false,
ValueFromRemainingArguments=true,
HelpMessage = "Arguments for the process.")]
public string[] Arguments
{
get { return _arguments; }
set { _arguments = value; }
}
[Parameter(
Mandatory = false,
HelpMessage = "Specifies the verb to use when calling ShellExecute.")]
public string Verb
{
get { return _verb; }
set { _verb = value; }
}
protected override void ProcessRecord()
{
try
{
int result = SafeImports.ShellExecute(IntPtr.Zero, _verb, 
_process, GetParameters(_arguments), String.Empty, 
SafeImports.ShowCommands.SW_SHOWNORMAL);
if (result <= 32)
{
throw new ArgumentException("An error occurred calling ::ShellExecute().");
}
}
catch (Exception e)
{
ThrowTerminatingError(new ErrorRecord(e, "ERROR", ErrorCategory.NotSpecified, null));
}
}
private static string GetParameters(string[] args)
{
StringBuilder sb = new StringBuilder();
foreach (string arg in args)
{
sb.Append(arg);
sb.Append(' ');
}
return sb.ToString();
}
}

This is not a complete project, so you will probably want to install the Powershell SDK and a few other goodies if you want to compile and run this thing, but once you do that it is all easy as pie. Also, the SafeImports class (not shown here) just contains the DllImport directives for ShellExecute from PInvoke.net.

Enjoy!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed
20

Yet Another Cool Windows Vista Keyboard Trick

Wednesday, 20 September 2006 07:38 by Peter Provost

For all I know, this may have been around since Windows XP, but I only recently discovered it on my Windows Vista RC1 machine.

The buttons in your Quick Launch bar are keyboard accessible using the Windows key () and a number.

So, with this Quick Launch setup:

I can quickly and easily get to Outlook by typing +3.

Very cool!

Tags: , ,

Currently rated 3.7 by 3 people

  • Currently 3.666667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
19

"Command Prompt Here" in Windows Vista RC1

Tuesday, 19 September 2006 02:05 by Peter Provost

Easy as pie and built right in...

Shift+Right click on a folder in any Explorer window and choose "Open Command Windows Here".

Now if only I could figure out how to get it to use PowerShell instead of cmd.exe.

Tags: , , ,

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed