Installing Visual Studio 2003 SP1 on Vista

28. June 2007
I’ve finally cracked the installation problems with VS 2003 SP1 on Vista. The problem seems to be that the SP must be installed under the same credentials that Visual Studio was installed. I.e. I installed Visual Studio under the domain administrator credentials, but I run my day-to-day under a standard user credential. When installing the SP1 I was elevating my standard user credential rather than running as the domain admin. I don’t know what difference that makes to anything, but it’s worked!

 

 Where was that purchase requisition for 2005?

ASP.NET, Windows Vista ,

Moving and resizing a VMWare System Disk

26. June 2007

I’ve recently had to upgrade my VM Server due to an increase in load. I had 2 virtual servers running off of the same hard disk, with 768mb of RAM split between the lot. After jamming 2 new 1GB sticks of DDR in, and a new 120GB hard drive it was time to re-allocate some of these resources…here’s how:

WARNING! You should always perform a backup on a server you can’t afford to lose BEFORE any operation that could potentially destroy the disk (think what would happen if you had a power cut while resizing…)

Step 1 - Moving the Virtual Server.

This is laughably easy;

  • Stop the virtual server from your admin interface
  • copy the virtual server folder over:
    copy “C:\Vitual Machines\SRV-WEB-DEV-01″ ”D:\SRV-WEB-DEV-01″
  •  Next time you boot the Virual Machine, you’ll have to re-attach the .vmdk in it’s correct location.

Step 2 - Resizing the VMWare Disk

Not quite so easy, but still not going to bother most.

  • Using the built in command line VMWare tool (C:\Program Files\VMware\VMware Server\vmware-vdiskmanager.exe) or the handy graphical front end written by Robert Petruska. Help on using the command line utility is available by typing “vmware-vdiskmanager.exe /?”. The command I used was:
vmware-vdiskmanager.exe -x 40Gb D:\SRV-WEB-DEV-01\SRV-WEB-DEV-01.vmdk
  • Once you’ve resized the drive you’ll need to resize the C: partition, or create a new partition of the space. There are 3 ways to do this that I know of.
    • The method I used was to mount the vmdk file to another virtual server so that I could use diskpart.exe (technet article here) to resize the partition - I’m running Windows Server 2003 on my VMs.
    • You can use a gParted live CD if you don’t have another virtual server available. I’ve used this in the past and it has been very reliable - you can also mount the ISO as your VM’s CD drive.
    • PartitionMagic and many other comercial solutions are also available - I’m not going to list them - google it!

That’s it - when you boot to your new machine you should have a nice big space to play with. One of the benefits of now having a 3 disks is being able to run each VM on a separate physical disk, which gives a nice performance boost. If you’ve got a spare disk hanging around you could always create an extra virtual disk, attach it and use it as a swap disk for your VM giving another performance boost.

VMWare, Windows Server 2003 , , , ,

DRM Free iTunes music with QTFairUse

15. June 2007

I’m not going to go into the rights and wrongs of DRM, I will say that I’m strongly against piracy and if your intention is to strip DRM for those kind of reasons, kindly go somewhere else for your info. If you’re wanting to strip DRM for a legitimate personal use, such as playing in another media player or an MP3 player other than an iPod - read on!

 QuickTimeFairUse is a great little application that takes your .m4p protected iTunes files and captures the decrypted data directly from the memory of your computer. This means that there’s no loss of quality at all from the process! The captured AAC data is then re-compressed into an .m4a unprotected file. That’s not the only benefit either, QTFairUse will also modify your iTunes library to point to the new .m4a file - including keeping all the metadata, album art and play information, so if you’re like me and have dynamic playlists generated by most played or five star rated it will keep them happy! It will back up your .m4p files and library too, so if something goes wrong you can easily revert back - not that I’ve ever had to. It’s also faster than real-time, it takes 5-15 seconds per song on my laptop with plenty of RAM.

The current download version does not support iTunes 7.2.0 (the latest one) so you’ll need to open the config file QTFairUse6.cfg and add the following to the end:

[Version8]
Desc=7.2.0
DebugCheck=0×4DE385
FrameCopy=0×826130
EndOfTrack=0×50E1D0
SndOut=0×5131D7,EB
LoopStart=0×651531
LoopCopy=0×6515E5
LoopEnd=0×651864
LoopPatch=0×651860,52

Once you’ve done that, run QTFairUse.exe and select the options that you require. You can scan your entire library or drag and drop files into the window. I don’t change any of the default settings because, well they’re great. The only thing I change is the location of the backup to a folder in My Music called M4P Backup.

Digital music , ,

Visual Studio Project Location Not Trusted

8. June 2007

Just a quick post today about trust levels for .NET assemblies that are hosted remotely. My current set up at work means that I am maintaining one version of our web site while working on developing a new one - not uncommon. I have 2 virtual servers running Server 2003, IIS and SQL Server, each an identical copy of our production server. Each solution and it’s projects are stored on each virtual server, with the project folders shared and mapped as drives on my laptop. (Before I get messages saying “why don’t you use source control, you can create branches etc, etc” - I am aware of that and the decision not to use source control is based on other factors that I’m not going to get into.)

 Anyhow, on to the problem and, the solution.

When opening a Visual Studio solution from a mapped or network location, you get a “project location not trusted” error. By default, your .NET configuration grants FULL trust to your local machine, so you won’t get that message working on a local project. Also by default, the Local Intranet is given a step below full trust - and here is the problem. You will need to be a local administrator on your computer to make these changes.

Open a command prompt, navigate to:

  1. cd %systemroot%\Microsoft.NET\Framework\\

Run the following command:

  1. CasPol.exe -pp off -m -ag 1.2 -url file://r:\folder\* FullTrust

or, for an unmapped folder

  1. CasPol.exe -pp off -m -ag 1.2 -url file://computername/folder/* FullTrust

This will set the share to full trust and allow you to work with the remote folder/mapped drive as if it’s on your local machine.

For more details about using CasPol.exe and a break down of the above commands, check out the .NET Security Blog

ASP.NET, Visual Studio, Windows Server 2003

Windows Server 2003 Admin tools under Vista

7. June 2007

If, like me, you want to administrate your Windows 2003 servers from your Vista workstation, you may find that you recieve an “MMC could not create snap in” error when you open one of the admin tools, it also manifests as corrupted graphics within some MMC Add-ins.

It appears that the dlls are not registered correctly, there’s a KB article from Microsoft that contains a script to reregister the dlls. It’s a simple fix:

  • Copy and paste the following script into a text document, save it as RegisterAdminPack.cmd
  1. @echo off
  2. REM RegisterAdminPak.cmd
  3. REM (c) 2006 Microsoft Corporation. All rights reserved.
  4. set filelist=adprop.dll azroles.dll azroleui.dll ccfg95.dll
  5. set filelist=%filelist% certadm.dll certmmc.dll certpdef.dll certtmpl.dll
  6. set filelist=%filelist% certxds.dll cladmwiz.dll clcfgsrv.dll clnetrex.dll
  7. set filelist=%filelist% cluadmex.dll cluadmmc.dll cmproxy.dll cmroute.dll
  8. set filelist=%filelist% cmutoa.dll cnet16.dll debugex.dll dfscore.dll
  9. set filelist=%filelist% dfsgui.dll dhcpsnap.dll dnsmgr.dll domadmin.dll
  10. set filelist=%filelist% dsadmin.dll dsuiwiz.dll imadmui.dll lrwizdll.dll
  11. set filelist=%filelist% mprsnap.dll msclus.dll mstsmhst.dll mstsmmc.dll
  12. set filelist=%filelist% nntpadm.dll nntpapi.dll nntpsnap.dll ntdsbsrv.dll
  13. set filelist=%filelist% ntfrsapi.dll rasuser.dll rigpsnap.dll rsadmin.dll
  14. set filelist=%filelist% rscommon.dll rsconn.dll rsengps.dll rsjob.dll
  15. set filelist=%filelist% rsservps.dll rsshell.dll rssubps.dll rtrfiltr.dll
  16. set filelist=%filelist% schmmgmt.dll tapisnap.dll tsuserex.dll vsstskex.dll
  17. set filelist=%filelist% w95inf16.dll w95inf32.dll winsevnt.dll winsmon.dll
  18. set filelist=%filelist% winsrpc.dll winssnap.dll ws03res.dll
  19.  
  20. for %%i in (%filelist%) do (
  21.  echo Registering %%i …
  22.  regsvr32 /s %%i
  23. )
  24. echo.
  25. Echo Command Completed
  • Run a command prompt under admin privileges (Start menu > All Programs > Accessories > Right click Command Prompt and select “Run as administrator”)
  • Navigate to where you saved RegisterAdminPack.cmd, and run it.

Simple as that. Some people find that the admin tool shortcuts aren’t installed under administrative tools, that didn’t happen to me, but you can either reinstall the tools or manually create the shortcuts by opening a new MMC window (Start > Run > mmc) and then adding the relevant snap-in. You can then save your console and create a shortcut wherever you desire.

Windows Server 2003, Windows Vista, Admin Tools , , , ,

Installing Visual Studio 2003 on Vista Enterprise

4. June 2007

It’s not as easy as you might imagine if you’re going to be developing on a local machine. The pre-requisites include IIS and FrontPage Server Extensions which will need installing.

Install IIS on Vista

Go through Control Panel, Programs and Features, then select “Turn Windows features on or off” on the left hand menu. The basic installation of Vista from the control panel will not be sufficient for a VS install, you must add IIS Metabase Compatibility (you’ll see why later), .NET Extensibility, ASP.NET, ISAPI Extensions, ISAPI Filters to the options. Don’t ask me why they didn’t have .NET support, one of their flagship products, install as default, I’d hazard a guess at reducing surface area to add to the ”secure by default” ethos. You can also script the installation and do a little more customisation, if that’s your need then try this TechNet article.

Installing FrontPage Server Extensions

If you want/need FrontPage Server Extensions, you’ll need to install them from here. Installing is straight forward, so I won’t bore you with that, the only thing to note is if it asks for a restart at the end, don’t say no because the installer will fail and roll back. Note that this is a beta version of the 2002 FPSE - don’t install it unless you’re aware of the consequences of installing beta software. Also note that there’s no new functionality, it’s the same version as the one used for Server 2003, made available for Vista.

Installing Visual Studio 2003

Now you can go ahead and begin the Visual Studio 2003 install. It will still ask you for the prerequisites disk, and most likely still want FPSE to install - let it do it’s thing.

Once you’re installing VS proper, you’ll recieve a “known compatibility error” warning, according to Microsoft you’ll have to run as an admin on your local machine. Since this is crappy security practice, you can “run as” (right click the icon - “Run as administrator”) or edit the shortcut to always run it as an administrator. This is the easiest way in Vista - navigate to your VS icon in the start menu, right click and select “Properties” and then select the “Compatibility” tab. Under “Privilege Level”, check “Run this program as an administrator”.

There is an MSDN page describing all the VS2003/Vista compatibility issues.

 Getting ASP.NET 1.1 running

 The other gotcha is that you need to follow some steps to get ASP.NET 1.1 running and debugging. Follow the steps in this IIS.NET article. I didn’t run into any issues going through those steps. You’ll find that ASP.NET 1.1 is already installed from the VS Pre-requisites, you will need to install ASP.NET SP1 and the security update - then restart!

Once they’re in it’s a simple matter of adding the ISAPI filter using this command (install using admin privileges):

  1. runas /user:domain\adminuser "%windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -i"

adding the following to your machine.config (windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config) This isn’t straight forward as the folder is protected by Vista and requires confirmation to do anything - you’ll find when you go to save it you get errors and file not found - the solution is to rename machine.config to machine.old.config, open it, edit and save it to your desktop. Then manually copy it to the folder, confirming when asked.:

  1. >>
  2. name=“system.webServer” type=“System.Configuration.IgnoreSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″>
  3. >

and finally, use this command (or use the IIS Admin panel) to set the default web site to use the ASP.NET 1.1 application:

  1. appcmd set app "Default Web Site/" /applicationPool:"ASP.NET 1.1"

Updating Visual Studio .NET

 Now that you’re getting bored of all this and wondering why you haven’t upgraded to VS 2005, it’s time to download the Service Pack for Visual Studio. I found that I couldn’t install the service pack because it wants the install source…I gave it the install source to no avail! If you manage to get around this, please post to let me know.

 That’s it - all done.

All being well, you’ve now got a working installation of Visual Studio 2003 on your Vista desktop. Sure, it was a faff, sure, you wish you’d upgraded, but think of all that work you can do now. I’m sure you could write a script for all that or optimize some of those steps, but that’s how I muddled through

Visual Studio, Windows Vista