Category Archives: Windows

More help is available

From the “Do you understand why people hate you, Microsoft?” department:

D:\>net stop xyz
The service name is invalid.

More help is available by typing NET HELPMSG 2185.

D:\>net helpmsg 2185

The service name is invalid.

D:\>

Yes. Very bloody helpful.

I don’t expect miracles in the command line, but I do expect that if I’m told more help is available, that more help is actually available.

Why can’t you resize Remote Desktop windows?

RDP optionsIf you can spontaneously change the resolution of Windows in a Virtual Machine, how come you can’t do it in a Remote Desktop session?

I’m forever opening up RDP sessions in the wrong resolution, because the RDP client seems to have a funny way of selectively remembering (or forgetting) the preference.

Sometimes if focussing entirely on the remote session, I’d like it to be full-sized. At other times I’d like it smaller so I can more easily jump between things.

Is there something complicated that stops RDP windows being resized after connection has been made? If it is possible in a VM, presumably it can’t be too hard in RDP?

It looks like in Windows 8 and later you can easily turn on “smart resizing”, and in earlier versions this can be configured in the .rdp file. But this scales the window at the original resolution, rather than changing resolution.

It’d be nice if proper resizing of the window was possible.

Upgrade of web site from .Net 2 to 4.5 breaks asmx web services

Despite my best Googling, nobody seems to have had quite this problem (and written about it).

I’m migrating a .Net 2 web site to .Net 4.5 (well, 4.5.1 to be precise). Everything seemed to work except browsing to the .asmx (web service) pages, which threw a System.BadImageFormatException: Invalid token error:

Error Stack:System.InvalidOperationException: Failed to handle request. —> System.InvalidOperationException: Unable to handle request. —> System.Configuration.ConfigurationErrorsException: Invalid token. —> System.BadImageFormatException: Invalid token.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
— End of inner exception stack trace —
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
at System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.PageParser.GetCompiledPageInstance(VirtualPath virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context)
at System.Web.Services.Protocols.DocumentationServerProtocol.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context)
at System.Web.Services.Protocols.DocumentationServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
— End of inner exception stack trace —
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
— End of inner exception stack trace —
at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)| Global.asax:Application_Error()

I tried adjusting the .Net version — turns out it would work fine in 3.5 or lower, but broke in 4 or higher.

My machine itself was okay — creating a new 4.5 web site with just a web service in it worked fine.

In the end the solution was to create a new web site and add the individual pages back into it, leaving out the Bin directory. I rebuilt that by adding references to the various DLLs back one by one. Something in the old Bin directory apparently was throwing it out.

Diablo I (yes, Diablo 1) LAN play on Vista or Windows 7

– and presumably 8.

There’s various convoluted steps to get LAN play working on more recent versions of Windows.

Mount the ISO on your hard drive, and use the somewhat unstable Microsoft supplied ISO mounting program to fool the program into thinking you CD is in a CD drive.  Install Diablo from here.  This step is not strictly necessary, but it’s so much quicker and cleaner than the alternatives.

Fetch and apply the patch to bring Diablo 1.00 up to version 1.09.  It may also be helpful to pull up the properties of the .exe and enable compatibility mode with WinXP Service Pack x. When fetching patch, get it for the version you’re installing – much confusion is caused if you get the spawned Diablo patch and apply it to the full version.

Go and get IPXWrapper, and per the instructions drop the DLL files into your Diablo directory. If you have a heterogeneous environment, all machines need to use this wrapper – IPXWrapper is a translation layer than transforms IPX into UDP, and without it IPX aware OSes like WinXP won’t see the network traffic of the IPX unaware OSes like Vista.  Punch a hole in your Windows Firewall to allow UDP port 54792.

To fix the palette issue, download the registry patch, which seems to work under Vista as well:

32-bit Windows 7 – http://ftp.blizzard.com/pub/diablo/d109_x86.reg
64-bit Windows 7 – http://ftp.blizzard.com/pub/diablo/d109_x64.reg

See?  Easy.  Doesn’t take more than a few hours if you don’t know what you’re doing.

Can’t copy address bar from Google Chrome

I’ve had periodic problems with Google Chrome on Windows (Version 32.0.1700.102 m, but this has also happened occasionally in the past); sometimes it will refuse to copy the address bar.

Instead of copying, it will clear the clipboard.

Copying from other places, such as a web page (content or using Right-click / Copy Link Address) works fine.

Not sure if it’s an environmental issue — only seems to happen on my work machine; I haven’t seen the same at home.

Very odd.

Blogging it here because I can’t see any mentions of it online (which might be because it’s just me). Will post back if I find the solution.

Update 2014-01-31: I uninstalled and reinstalled Chrome… it seems to work again, for now.

Update 2014-02-05: The problem seems to have come back. Very odd.

Update 2014-02-20: Some old posts on a related problem seemed to suggest it might be a Chrome Extension causing issues, so I removed all of mine. The problem seems to still be intermittently occurring.

Postscript: As per the comments, if you have Remote Desktop running, try shutting it down.

Installing Pygal into Cygwin

Pygal is a python library for emitting SVG charts. It might do PNGs too; the documentation is… sparse. Okay, there’s no documentation, but they show you several ways to make bar charts, and figure you can follow on from there.  Anyways, the installation instructions don’t work, not under cygwin.

Here’s what you should do:

  1. ensure cygwin has the libs libxml2-devel and libxslt-devel installed
  2. issue the command
    cygwin$ pip install pygal

and you’re done. Getting pip into cygwin is a whole world of hurt, but you will need to go looking for a http (not https) source to download setuptools, then download and run ez_setup.py, followed by using pip to upgrade setuptools. Have fun with that; I know I did.

Nvidia 8800GT nvlddmkm.sys blue screen of death

I’ve got two old Mac Pros, and on one of them, the Nvidia 8800GT video card suddenly started causing weird errors in Windows.

Nvidia crash

Then it started doing the blue screen of death repeatedly, a crash in nvlddmkm.sys.

Nvidia blue screen

I have no idea why it started happening now — the Nvidia drivers don’t appear to have been updated for months, and Windows Update hasn’t installed anything for almost a week.

Oh well.

Boot into Safe Mode With Networking

Download the latest drivers

Install with Clean Option on

Reboot

Seems now to work, touch wood.

Update 2013-11-19 18:45 — No such luck. It seemed fine this morning, but later on started crashing like before. Investigations continue.

Update 2013-11-19 21:00 — After playing around disabling various things, and puzzling over what might have updated itself (since there was nothing recently installed or patched listed by Windows), I think I may have found the culprit: the Steam client beta (which I’m using to get the family sharing trial). Have disabled this, and Windows seems to be stable again. Will try it for a bit longer, then report findings to Steam.

Update 2013-11-20 — It couldn’t be that easy, of course. And I have dissed Steam without justification. The video card is still playing up — now so much so that:

  • a lovely speckly pattern appears when booting
  • Windows proclaims the video card isn’t working, and automatically puts us into Base Video (640×480) mode
  • OS X won’t boot at all — the GUI presumably tries to come up, then it reboots

Oh dear. Trouble in video card land.

The card is an NVidia GeForce 8800 GT, quite a nicely specced card. I suspect it’ll need replacing, dammit.

Update 28/11/2013: As per the comments I found another spare PCIe card (an ATI Radeon 3870) which works… in Windows. Not in OS X. Even the broken card partially works in Windows, but not at all in OS X.

A workmate pointed me to the Tony Mac x86 web site, where I found a good list of graphics cards compatible with OS X.

Thankfully however this specific machine is mostly used for Windows-only, so there’s no tearing rush. In fact Windows performance index thingy rates the ATI card slightly higher than the nVidia one.

One option is to buy the official Apple-supported Mac Pro video upgrade kit, an ATI Radeon HD5770, which is A$299. Despite the Apple site claiming it requires a post-2010 Mac Pro, plenty of sources indicate it’s fine with a 2008.

Update 2014-04-08: New video card bought and successfully installed

Low spec notebooks can’t handle large amounts of RAM

Cathy and I are seeing increasing contention for the grunty computer in the house not dedicated to playing computer games. It’s used for a combination of recreational programming, web surfing and media encoding tasks. We decided to acquire a second, and after comparing the costs decided that the premium for laptop portability wasn’t too great (about $100; in fact that seems to be about the price of the OS we were forced to buy with the hardware). In out usage profile, “grunty” isn’t defined by CPU, but responsiveness which really comes down to how often an arm has to venture out across a spinning sheet of rust. Unfortunately, bottom-end systems (i3 class CPUs) can’t handle our base-level RAM requirement of 16Gb, so yet again a portable computer is the most powerful thing in the house – the new system’s specs are:

Processor: AMD Quad-Core Processor A6-5200 (2.0GHz, 2MB L2 Cache)

25W of power consumption right there. Existing grunty computer pegs its CPU for about ten hours a year, in sustained encoding runs. We weren’t CPU bound, and yet the only way to get that RAM in an i3 lappy was to spend an extra $100 on a Toshiba with worse specs – so we got a quad core.

Memory: 4GB DDR3 1600MHz (max support 16GB)

That 4GB came straight out and was replaced by the most RAM that could be stuffed in there. Existing grunty machine had 8Gb and was paging a lot. Why are web browsers so memory hungry? This upgrade cost $160.

Storage: 500GB (5400RPM) Hard Drive

This came straight out before the machine was even powered up once. It was replaced by a Plextor M5-Pro 128GB SSD; this unit was selected for its fast random write speed, and the common-for-all-SSDs 0.1ms seek time. Back in the day (about ten years ago) I advocated that when building a machine, you should get drives with the fastest seek times and screw everything else, plus all the RAM you could afford – to use as disk cache. How little things change. This upgrade cost $129.

After Linux Mint 12.04 Maya (LTS) was installed (consuming 6Gb) there was 110Gb free on the replacement device. Paging has been disabled due to the SSD write limitations, and tmpfs is used for various directories to further minimise our impact on the longevity of the drive.

Graphics Card: Onboard (Integrated)

The contention for the memory bus is troubling, but at least there’s no extra juice being sucked down to power a fancy-pants GPU. This is not a gaming machine, 2D acceleration is useful, 3D not.

Operating System: Windows 8 64 Bit

That went with the rotating media. We’re going to see if we can boot a desktop machine off of it and still have the OS believe everything is okay. The laptop didn’t like the new OS, saying “Selected boot image did not Authenticate. Press Enter to Continue”, but the solution was to disable Secure Boot.

Screen: 15.6-inch diagonal HD BrightView LED-backlit Display (1366×768)

It took some fiddling for Cathy to figure out how to dim the damn thing under Mint. Turned out the answer was to install the proprietary AMD drivers.

Audio: Dual Speakers Stereo DTS Sound+

If you’re using a laptop for A/V reproduction, you’re doing it wrong.

Connectivity: Gigabit LAN (RJ-45 connector), 802.11b/g/n WLAN, Bluetooth

The Toshiba only had 100Mb, in this day and age! The Ralink wireless adapator wasn’t picked up automatically by the installer, so Cathy got down and followed the instructions off AskUbuntu

Built-In Devices: 1x USB 2.0, 2x USB 3.0, HDMI, RJ45 Ethernet, Headphone-out/microphone-in combo jack, SD/SDHC/SDxC Card reader

USB3 was important in picking the unit, as I’ve seem just how much faster it is. HDMI is necessary for twin-monitor development; MSY had a 21.5″ Full HD IPS on sale for $118.

Webcam: HP TrueVision HD Webcam with integrated dual array digital microphone

I’d just paint over it, but there’s a chance that we’ll have a use for videoconferencing. It stays, but it better mind it’s Ps and Qs or else it’s black electrical tape for it.

Optical Drive: DVD Burner

Yeah, like that’s ever getting used.

Weight: 2.33 Kg

I’m more used to computers that weigh 1Kg, not two and a half.

Dimensions: 56cm (L) x 13cm (W) x 34.5cm (D)

This thing has a widescreen display, it’s freaky big compared by my 10” netbook.

Other observations: the keyboard sucks balls, with the trackpad positioned such that you physically can’t touch-type on it because doing so places your palms on the trackpad, moving the mouse and screwing up your input (I think this is happening because gestures have been turned on; they might find themselves getting turned off again). For some messed up reason they’ve included a numeric keypad, so touch-typing is doubly hard – again with the palms. This thing’s going to find itself plugged into a USB hub with a real keyboard and mouse quite a lot I think.

Anyways, the HP Pavilion 15-E001AU was purchased from MLN for the low, low price of $500. Total system cost was $907, and at the end we had a 4GB lappy stick and a 500GB lappy drive laying around.

Windows Vista: Could not connect to the System Event Notification Service

M's laptop got the above error after rebooting during a Windows Update.

The error itself appears just after entering the username and password. And the big problem is it then doesn’t logon, but just freezes up.

Doing a bit of Googling finds quite a few instances of this error, but usually on Windows 7. One notable thing: the problem means non-Admin users can’t logon, but Admin users can. But the other info around the place didn’t really seem relevant.

So I logged in as an Admin user, and while looking through the Event Log to try and find out what happened, I noticed Windows Update said there were 3 more Important Updates to go.

I let them go in, and then rebooted. Fixed.

Yeah I could keep digging to better identify the cause, but the problem’s resolved for now, and I’ve got better things to do.

So my conclusion (in the absence of any other information) is that this weekend’s Windows Updates somehow require an Admin user to logon to complete… and if not, they leave the SENS service unable to start, possibly as well as other issues that prevent non-Admin users logging on.

Mac Pro – faster booting Windows than OSX

As I mentioned, my secondhand Mac Pro might very well be the best Windows computer I’ve ever owned. The hardware is just lovely, and it runs Windows really well.

Here’s the thing: it seems to boot faster in Windows 7 than it is in OSX 10.8 Mountain Lion.

  • Boot time (from Boot Camp menu to logon): 55 secs OSX / 35 secs Win7
  • Logon to desktop (from hitting enter on password, to desktop ready): 28 secs OSX / 12 secs Win7
  • Start Chrome and click bookmark for GMail: 10 secs OSX / 7 secs Win7

Once it’s running, OSX is very responsive, but the boot just seems to take ages.

What's going on here?

Perhaps being a 2008 Mac it doesn’t run OSX 10.8 that well… though I’d have thought it is a pretty fast box (2 x 4 core Xeon 2.8 GHz, 8Gb RAM). It’s true that Win7 is not the latest version of Windows — it appears Win8 is not supported on this Mac model under Boot Camp.

Does something in OSX need some optimisation perhaps? What's the OSX equivalent to running msconfig and turning off automatic startup for things you don't need?

OSX experts, any ideas?

Remote Desktop and ghost printers

For those who use RDP to reach Windows servers…

Event Viewer on the servers sometimes generates System Errors due to RDP sessions configured to try and connect printers… which don't exist on the servers.

Pretty silly, but it seems to often be the default for RDP, and it clogs up the Event Viewer with unnecessary errors, which slows you down when you go searching for actual errors.

It appears you can prevent this by configuring Remote Desktop to not try and use local printers in the session – eg under Remote Desktop, Options, Local Resources, switch off Printers.

You may need to configure this separately for each host you connect to… but those of us who have to look through Event Viewer for errors will save time, and thank you for it, if you do!

zp8497586rq