Author Archives: admin

Getting a Command Prompt Here in Vista

0
Filed under Uncategorized

Like any good developer, I have two ton crap load of Utilities, config, scripts, etc that I regularly make use of. Unfortunately, they’re all tailored towards Windows XP and I’m now in the process of setting up a Vista machine for development.

The first thing I ran into is that you can’t just dbl-click REG files anymore to merge them, unless they only modify the HKEY_CURRENT_USER hive. Grrr. Running Regedit as Admin is a workaround, albeit not a great one.

A bit more problematic, though is my favorite DOSHERE.INF file. This little jewel goes back to, what, Win95 and the old PowerToy kit, I believe.

At any rate, here’s my modified version that works fine under everything up to Vista, but no-ops now.

;
; "DOS Prompt Here" PowerToy
;
; Copyright 1996 Microsoft Corporation
;
[version]
signature="$CHICAGO$"

[DosHereInstall]
CopyFiles = DosHere.Files.Inf
AddReg    = DosHere.Reg

[DefaultInstall]
CopyFiles = DosHere.Files.Inf
AddReg    = DosHere.Reg

[DefaultUnInstall]
DelFiles  = DosHere.Files.Inf
DelReg    = DosHere.Reg

[SourceDisksNames]
55="DOS Prompt Here","",1

[SourceDisksFiles]
DOSHERE.INF=55

[DestinationDirs]
DosHere.Files.Inf = 17

[DosHere.Files.Inf]
DOSHERE.INF

[DosHere.Reg]
;DWH Modified the below lines so that
;they work under NT
;How would you indicate the actual COMSPEC environment var?

HKLM,%UDHERE%,DisplayName,,"%DosHereName%"
HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\DosHere.inf"
HKCR,Directory\Shell\DosHere,,,"%DosHereAccel%"
;HKCR,Directory\Shell\DosHere\command,,,"%10%\command.com /k cd ""%1"""
HKCR,Directory\Shell\DosHere\command,,,"cmd.exe /k cd ""%1"""
HKCR,Drive\Shell\DosHere,,,"%DosHereAccel%"
;HKCR,Drive\Shell\DosHere\command,,,"%10%\command.com /k cd ""%1"""
HKCR,Drive\Shell\DosHere\command,,,"cmd.exe /k cd ""%1"""

[Strings]
DosHereName="DOS Prompt Here PowerToy"
DosHereAccel="Command &Prompt"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\DosHere"

From what I can tell, the main problem is that INF files just can’t alter HKLM or HKCR when run as a normal user (even with admin privileges).

I have used a simple little reg script from time to time also

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\DosHere]
@="Command &Prompt Here"

[HKEY_CLASSES_ROOT\Directory\shell\DosHere\Command]
@="C:\\WINDOWS\\system32\\cmd.exe /k cd \"%1\""

and this works quite nicely on 2000 and XP, but it does not work when fires via the Context Menu in the tree portion of Explorer under Vista.

However, in poking around the registry on Vista, I discovered an interesting little tidbit.

Vista already has support for a “command prompt here” built in (at least Vista Ultimate does, which is what I’m using. The reg entry looks like this:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="Command &Prompt Here"
"Extended"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

The Extended entry appears to cause the item to only show up when SHIFT is held down.

Notice the difference in the command line from the earlier version. Why the /k cd {path} doesn’t work from the tree, but the pushd %V does, who knows?

So, I hack a little to come up with this:

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\Cmd]
@="Command &Prompt Here"
;remove this property so that command shows all the time, not just when you hold down SHIFT
"Extended"=-

[HKEY_CLASSES_ROOT\Directory\shell\Cmd\Command]
@="cmd.exe /s /k pushd ""%V"""

And lo, the angels sing and I can continue on my merry way.

New Board Is Online

0
Filed under Hardware

I’m slowing getting my hardware issues back in line.

First, there I had a failure on a 320gb Western Digital drive (unbelievably cool and quiet drives btw), which took out my main workstation.

Then, my server started crashing, and after some investigation, I had a drive in it’s raid failing too, though not completely, just getting read errors and timeouts that the driver apparently could only sometimes recover from. I’ve been generally happy with Promise RAID cards, but the fact that a read/timeout error can lock the machine bugs me. But, it’s an older FastTrack TX4000 so what can I say.

Next, I discover that the otherwise awesome Gigabyte GA-P965-DS3 motherboard I picked up won’t do anything but a 2 drive RAID. Gotta pay more attention to those specs<g>.image

Eventually I settled on the Intel D975XBX2 board. Nice board, it’s got serial/parallel ports for all those hacking urges, plus FireWire, lots of USB, and 8 SATA ports, with up to 4 drives in one Intel Matrix RAID and 4 in another.

Plus it’s got these nifty flame heatsinks right out of West Coast Choppers.

image

First impressions are that it’s OK, but it’s not all solid capacitor design, and the boot time seems significantly slower than the Gigabyte board. Plus the board itself just doesn’t look as nice. Things aren’t labeled as clearly, etc. From what I can tell, it very well may be that Intel outsources the board to FOXCONN, so this may be a Foxconn board in Intel clothes. Personally, I would have loved to go with the GA-P35T-DQ6. Much nicer looking, sweet heatsinks, solid caps, all the right ports, RAID, etc. And it’ll do Crossfire. But otherwise, it’s got only PCIEx1 slots and it appears to require memory faster than DDRII 800. I’m just not up for buying virtually a whole new machine right now.

One thing the Intel board won’t do is convert a single drive into part of a RAID intact. You have to start fresh (or restore a drive image). Restoring the drive image seems a little risky though. After all, most RAID drivers need to be installed during the initial OS installation process (using F6), so I’m not sure how much mileage I’m going to get from that concept.

Long story short, anyone interested in a used but otherwise completely functional Gigabyte GA-P965-DS3 mobo? Comes with all the original packing, anti-static bag, sata cables, manual, backplate, etc. They’re 130$ on newegg.com. Come on down, make me an offer!

VB8 to have Runtime Agility

1
Filed under Software Architecture, VB Feng Shui

Leave it to MS to come up with the phrase Runtime Agility, but the concept, if I’m understanding it right, is very intriguing.


The post is here, but to summarize, Paul Vick is a lead on the VB team, and is discussing some of the items on the block for VB8.


He off hand mentions this…


Runtime agility. The ability to compile without a VB runtime, or targeting another VB runtime.”


Now, if I’m reading that right, this would seem to be huge. The idea of VB being able to “compile in” the runtime is something I know I’ve been asking for since VB3. Does it waste a little space? Sure. But it means you can truly have a single EXE “copy and deploy” type scenario.


And does this mean the .NET runtime bits that are necessary will get baked in as well? Too early to tell, I suppose. Still. Something very interesting to watch in the coming months.

+You+ Program It…

1
Filed under Hardware

Now here’s a nifty little gizmo.


80 Cores on a chip. What is that, Deca-Octa-Core?


You’ll need one hefty 10 core machine just to generate the code to run on it<g>.

Citrix Connection Error

3
Filed under Telecommuting, Troubleshooting, Utilities

I’m now in full rebuild mode after last weeks unfortunate RAID incident.


After installing Citrix Desktop and setting all my parms back up, I got


“The desktop you are trying to open is currently available only to administrators. Contact your administrator to confirm that the correct settings are in place for your client connection.”


After some digging around, I came across this Citrix posting that was exactly the problem.


I had the Citrix Connection set to “Server”, it needs to be “Published Application”.


Too bad the error message itself didn’t actually mention that. But it’s hard to find too much fault in that.


 

The VS Shell and Extension Methods

5
Filed under Software Architecture, VB Feng Shui

Here’s an interesting read on something coming down the pike with Visual Studio. Basically, it’s a customizable shell of VS that would theoretically allow you to build you’re own Visual Studio, language and all.


Likely, it’ll be on a complexity scale of integrating VBA into your app (anyone remember that 300-armed, greased-up monster squid?), but still, very interesting.


Another interesting read on Extension Methods coming in VB9. I’ve wondered why something like this hasn’t been in VB since the very early days of classes (anyone remember VB4?). Why, oh, why have I never been able to create a method like:

Public Function MyOwnReplace(Self as string, Arg as string) as String Extends String
Return Blah(Arg)
End Function

and then use it by calling the function method off of any ol’ string variable…

Debug.Print MyString.MyOwnReplace(Arg)

Maybe this is a contrived example, but the Dynamic languages concept of extending existing objects is something that just belongs in VB.


 

RAID Fun

2
Filed under Hardware, Troubleshooting

So ages ago, in internet time (or 9 months ago in real time), I set up a brand new machine, specifically for development with VS2005 and ASP.NET (because, well, it takes a dual core 2.66ghz, 4gb ram beast to be able to write a text file without your keystrokes backing up, but that’s another story).


I’d set up a RAID 0 (that’s striped), mainly for the added performance, which was pretty staggering. My intention was to pick up a couple more drives later and round it out to a RAID 0+1 (which I have in my server, protecting all my actual source, etc).


Anyway, a drive died, quite prematurely, and my machine is thus rendered a doorstop.


I sent off the RMA to replace the dead drive (still under warranty), and picked up 2 more to round the RAID out.


Then I discovered that the Gigabyte GA-965-DS3, otherwise a totally bad-ass mobo, doesn’t actually do raid 0+1. It only supports a 2 drive raid, either RAID 0 or RAID 1. Doh! Tip to manual writing guy: Don’t say things like…



Before you begin


Please prepare


1) At least two SATA Harddrives…If you do not want to create a RAID, you can only prepare one harddrive.


…”


That is a quote directly from the manual.


In my book, the implication there is that you could use more than 2 harddrives in the RAID. Unfortunately, such is not the case.


So I went off to the local computer store and picked up a PCIE 4 port SATA II RAID card, thinking I’d slap it in and be done.


Nay, spoketh St. Ignacious PCMCIA of the holy hardware. That card is PCIE x4, and my Gigabyte motherboard only has 3 completely unused PCIE x1 slots.


Back to the computer store.


I could get a PCI SATA II RAID card, but SATA II drives can pump 3Gbps, whereas a PCI slot can only manage about 266MBps. Does seem right to build up a smokin’ machine, then force it to breath through a pixie stick.


Ok, new mobo time.


Looks like the Gigabyte GA-965-DQ6 has all the bells and whistles, plus the right combination of RAID, PCI slots, ATI Crossfire compatibility, USB and Firewire, plus, it even has a serial port on the backplane, just right for hacking X10.


Note to self: Don’t bother “presetting” up a harddrive that you might want to mirror in a RAID later. Both the Gigabyte built in RAID and Window’s software RAID (via “dynamic disks”) want to obliterate any disk they RAIDify.


The nice dedicated RAID cards (like the Promise Fasttrack), I believe can handle that. Hell, one I was reading specs on seemed to imply it could convert, on the fly, between RAID 1, 0, 5 or 0+1, provided you have enough free space. Now that’s a good time!

Never joke about Hardware problems

2
Filed under Hardware, Troubleshooting

A few days ago, I posted light-hearted jab about some computer problems on the ISS. Well, never one to walk away from an opportunity, karma visited yesterday with no less than a complete failure of one drive in a RAID 0 I have on my main workstation.
For those that have never run RAIDs, it stands for “redundant array of inexpensive disks” and you can run several different configurations.

  • RAID 0 – striped, 2 drives contain various pieces of files, such that you get double performance because both drives can be busy writing and reading different pieces of the same file at the same time. You get almost twice the performance and still have access to the full capacity of both drives.
  • RAID 1 – mirrored, 2 drives contain exactly the data between them. Speeds up read performance, and provided an online backup of data. You have 2 drives but the effective disk space of just 1.
  • RAID 0+1 – striped and mirrored. Best of both of the above.
  • RAID 5, 6 etc – Even better but typically requires higher end dedicated RAID cards.

I had set up a RAID 0 for performance, intending to add 2 additional drives and mirror the setup later, for fault tolerance.
Well, later didn’t come quickly enough, it seems, and one of the less than 9-month-old Western Digital WD3200KS drives (sweet drives, BTW, unbelievably quiet and cool running), went belly up way before its time.
So, I’m filling out RMAs to return the dead drive and ordering two more to complete the full RAID 0+1 setup.
A question for anyone who’s ever done this before. Can I setup a striped RAID 0 now, and add the 2 additional drives later to convert it to a mirrored/striped RAID 0+1 later, when the 2 drives come in, or do I have to have them all in place when I create the RAID initially?
Haven’t had much luck finding an answer online.

PowerShell Curiosities

2
Filed under Software Architecture, Utilities

I’ve recently read several blogs about how great Windows PowerShell is, so I decided to check it out myself last night.

I didn’t get very far before I came across this on the download page:

“The .NET Framework 2.0 is required in order to install Windows PowerShell”

Ok, fair enough.

And then I proceeded to actually check out the download page, where they present no fewer than 20 different download options, including variants for “English” and “localized”, x86 and x64, plus Itanium.

First, I know from experience that it would be almost insane to suggest that small development shops try to maintain 20 different downloads of what is essentially the same product. MS can get away with this because they’ve got lots of money to throw at the problem, but is 20 different downloads of a command shell utility really justified? Ok, some of them are for some MultiLingual UI addon, so the total versions of the utility iself is fewer than that, but not by much.

The bigger issue I have here, though, is that I thought, and MS would surely have everyone believe, that the .NET runtime and the JIT compiler within should automatically be handling the differences between x86, x64 and Itanium. That’s the whole point of the JIT, right? The multilanguage versions? I can accept them, with reservations, but the different processor versions? I’m no expert on the PowerShell internals, but if it requires the .NET framework, that would seem to imply that it’s managed code, which would imply that the JIT should take care of the differences between platforms. And if it’s not managed code, why not? Is it that MS is saying that managed code is good enough for everyone else, but not good enough for them?

Reminds me of the discovery I made ages ago that Outlook communicates with Exchange via RPC, not via DCOM, even though DCOM was being pushed hard by Microsoft at the time. Another case of “good for you, not good enough for us”, perhaps?

Oh, and PowerShell looks like a very handy tool for Administrators. I’m sure I’ll find some uses for it eventually. But, get-childitems -path env: just to retrieve the current environment vars? There’s something to be said for mapping all sorts of various available info like that into a consistent interface, but my stack’s too deep as it is right now to pile this syntax on top just yet.

You think your computer problems are bad?

1
Filed under Misc, Troubleshooting

How’s this for a rough IT problem. Apparently, the ISS is having some difficulties getting several fairly important systems back online after some problems.

Of course, if they need computer help, I’d love to offer to take a trip up to help debug things<g>.

Wouldn’t that be an awesome GeekSquad tech call!