Scott Hanselman

How to list all the files in an MSI Installer using VBSciript

June 29, '04 Comments [1] Posted in Programming
Sponsored By

Just a quickie today, someone wanted me to give them a list of all the files that were inside an Windows Installer (MSI) and I remembered that MSI's were databases (Access?) so:

Option Explicit
Const msiOpenDatabaseModeReadOnly = 0
Dim installer : Set installer = Nothing
Dim WshShell : Set WshShell = CreateObject("Wscript.Shell")
Dim szMSI : szMSI = WScript.Arguments.Item(0)
Dim folder : folder = WshShell.CurrentDirectory
Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
Dim database : Set database = installer.OpenDatabase(szMSI, msiOpenDatabaseModeReadOnly)
Dim View, Record
Set View = database.OpenView("SELECT FileName FROM File") 'could include FileSize, etc
View.Execute
Do
 Set Record = View.Fetch
 If Record Is Nothing Then Exit Do
 Wscript.Echo Record.StringData(1)
Loop
Set View = Nothing
Wscript.Quit(0)

You call it like this: cscript WhateverFileName.vbs YourInstallerDatabase.msi

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Power User Windows Registry Tweaks

June 29, '04 Comments [8] Posted in ASP.NET | Tools
Sponsored By

I've collected these over the years, and I keep them in My Documents so I can setup a new machine the way I like it.  I remember where I found a few, others not so much.  So, if I've not thanked you - thank you.  If you were the one that made a particular hack, let me know in comments and you'll be attributed.

Warning: Use this stuff so VERY much At Your Own Risk.  And read them in notepad before you double-click to make sure any paths are appropriate to your machine.

Enjoy.

UPDATE: Sorry, my ISP was blocking .reg extensions.  They are now .txt, you'll need to SaveAs... them yourself.

UPDATE^2: Oy, sorry again, bad link on VolumeCaches.reg and bad chars in MajorControl.reg.  Fixed.  Thanks for catching it.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Wanna buy some stuff?

June 29, '04 Comments [0] Posted in Musings
Sponsored By

Forgive me for this blog abuse, but - wanna buy some stuff?

We now return to you to your regular bloggin. :)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

I am SO sick of PC Gaming - I HATE IT

June 28, '04 Comments [25] Posted in Gaming
Sponsored By

I'm so frustrated.  I've got a P4-3gig, 1 gig of Dual Channel RAM, with a very nice 128 meg NVidia FX 5200 card that I bought LAST YEAR for $150, and my new 1600x1200 Dell LCD Monitor and I can't get a freaking PC game to work worth a damn on my machine.

Case in point:

I picked up a Saitek P880 Dual Analog Joystick and figured I download the latest round of game demos to see what's hot.  I got FarCry, Rainbow Six, Thief 3, and Return to Castle Wolfenstein.

The Results:

  • Far Cry: Unacceptable performance even at 800x600.  I could BARELY pull 20 frames per second (fps).  Additionally, as I didn't feel like being an "inverted-T: ASDW" keyboard and mouse first-person gamer (God Forbid) I tried to use the Saitek.  I messed with it's remapping software for an hour, because apparently while DirectX 2199 understands that dual analog sticks exist, most games don't care. 
    Result: Disappointment and 3 hours wasted.
  • Rainbow: Totally unusable at anything other than 640x480 and even then, iffy.  Again, messed with the joystick.
  • Thief3: Gorgeous game, as along as I didn't try to move.  Got about 10 fps at 1024x758, and it was WAY to blocky to play at 640x480 on such a big LCD.  All these tests are with Anti-aliasing turned off.
  • Return to Castle Wolfenstein: The ONLY game with GOOD Video performance at 1024x768, which I think is the minimum comfortable resolution for FPS gaming.

Seems to me that the only games that are useful or even playable on the average machine are Real Time Strategy games like Rise of Nations or not-very-graphics-intensive games like Dungeon Siege. 

What I'm confused about is why a game like Castle Wolfenstein performs so nicely, but Thief can barely move at the SAME RESOLUTION?  Perhaps my video card (and most) are so tied to whatever version of DirectX is in vogue at the time, that my little DirectX 8 Video Card is a pariah in the world of DirectX 9.

What's frustrating about all this is that I'm actually considering getting one of these new fangled NVidia G-Force Ultra 6800's, just so I can get ahead of the game and stop worrying if my sad little 3Ghz system can run Pole Position.

And the irony of all this?  My XBox works fine.  Picked up a steering wheel controller for $25 at Fry's and have been happily driving the hills of Scotland, multiplayer with a guy in Scotland without trouble.  No install, no key remapping, just play the game.  Hm.  The PC may have 1600x1200 DOOM 3 for only $4000US and a Water Cooler, but my $149 XBox plays fine. 

Someone tell me why PC gaming matters?

Addendum: Looks like my current video card IS crap:

CardArchitectureClock SpeedMemory SpeedMemory SizeMemory BandwidthRAM-DAC Fill Rate Pixels/s
Geforce FX 5200256-bit250Mhz 400Mhz (DDR)128Mb6.4Gb/sDual 400Mhz1 Billion
Geforce 6800 Ultra 256-bit400Mhz 1.1Ghz (DDR)  256/512 Mb35.2Gb/sDual 400Mhz6.4 Billion

Well, maybe the 6800 card will be enough for Longhorn.  Wonder if I should get it and water cool my system while I'm in there?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Another VS.NET Add-in enters the Fray...."Solvent" for Solution Explorer

June 26, '04 Comments [6] Posted in Programming
Sponsored By

Very cool, Travis has created a Solution Explorer-specific Visual Studio.NET Add-In to make the Solution Explorer "suck less."

Let's hope the innovation keeps coming.

I'm digging Command Prompt Here from within Solution Explorer as well as the ability to Recursively Open all Folders (Though, I've gotten pretty good doing it myself with two fingers and cursor keys, over and over again. :) )

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.