January, 2007

  • Never doubt thy debugger

    Enable System Restore on Windows 2003

    • 20 Comments

    Have you ever found yourself in a situation where after installing some particularly appealing application, a new video driver which promises astonishing effects with your new PC game, and after a reboot the system simply refuses to start? Or maybe you enter your credentials as you already did probably a million times, and you then end up watching a box which tells "Applying computer settings" but this lasts forever?
    Being quite curious towards technology and technical gadgets (not necessarily meaning Vista gadgets smile_regular), and due to may job where I have to often install and test on my machine sample application I get from customers, unfortunately I found myself in this situation more than once and luckily in those occasions I've been saved by the by System Restore feature available in Windows XP.

    When a while ago I decided to switch on Windows 2003 as my primary working machine, and I then needed to restore the system to a earlier point, I discovered that System Restore is not available in our server platform... but I didn't want to give up that "parachute" which saved me so many times (but not in that occasion... that is a lesson I learnt in the hard way... smile_sad).
    So I decided to dig into this issue with a few questions in mind: why this is not available in Windows 2003? Could this be installed anyway, somehow?

    I finally come up with the following procedure which worked great on my machine but I must warn you: read this very carefully before doing anything I describe here, and do it only if you feel comfortable working with the System Registry, the Services snap-in etc... As you can imagine, neither me not Microsoft can be considered responsible for any damage caused by this procedure, which is not supported by CSS (Customer Services and Support, formerly known as PSS).

    So, if you're still with me, to start we need a WinXP installation CD (doesn't matter is Home Edition or Professional). In XP system restore is installed in syssetup.inf under the inf.always section. If you have XP installed, you can open up %windir%\inf\syssetup.inf and search for "[Infs.Always]": you'll see the section XP looks at for installing system components. You'll notice it has sr.inf, this is the inf for system restore. For Windows 2003, if you look at syssetup.inf you won't find sr.inf. This doesn't mean system restore won't work in server 2003, it just means we don't install it (now sure why).

    Now we have to right click on sr.inf and select "Install", to install it on Windows 2003. If you have XP installed on another machine/partition you can simply right click on it; if you don't, extract \i386\sr.in_ from the XP CD to a folder of your choice, then right clink on it and select "Install". It will ask you where the files are, so point to the XP CD. When done you'll be prompted to restart the system: do it.

    That was easy, now comes the tricky part. After restarting the system you'll get an error saying that the service could not start, specifically this is error 1068: this means it cannot run under the service is on. If you look at it in services.msc console, the path of the executable will be "C:\WINDOWS\system32\svchost.exe -k netsvcs". This got me thinking so I opened up sr.inf, and found this line:
    [SRSvc_delreg]
    HKLM,"Software\Microsoft\Windows NT\CurrentVersion\SvcHost","SRGroup"

    I opened up regedit, and this registry key didn't exist. So it seems the sr.inf doesn't register system restore to run under the network services group. Using the above registry key as an example, I opened regedit and went to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost. On the right side I saw netsvcs. I double clicked on it, but could not find SRService (this is the name for system restore).

    On a hunch, at the bottom I added SRService, rebooted, and this time got no error on startup. I opened up rstrui.exe, and System Restore opened fine. I also had a System Restore tab in System Properties now, too. I was able to make a restore point fine, then restore the computer to it without any problems. So in the above registry key double click on netsvcs, and at the bottom of the list type in SRService (not sure if this is case sensitive or not).

  • Never doubt thy debugger

    I've been tagged :-)

    • 0 Comments

    So... this seems to be the game of this New Year (not really sure when it started, though)... Doug tagged me, so I'm now supposed to tell you 5 things you don't know about me... here we are:

    1. I come from a completely different background: I studied Organ and Composition at the conservatory of Parma; do you know the "Ham of Parma", or the "Parmigiano Reggiano" cheese, the "Parmalat" (sadly known for a huge financial disaster 3-4 years ago, as the "Italian Enron") or Giuseppe Verdi? Well... I come from that land (an by the way, the native house and village of Verdi is just 5 minutes from the house where I grown up and lived for about 28 years... maybe that is what influenced my choice). Speaking of my favorite music, I'm an ancient guy (meaning I most like the Renaissance, Baroque and Classic eras, from W.A.Mozart backward), but of course I also don't dislike some melodic "modern" songs... for sure I don't like Heavy Metal and Techno Music (the latter can be really called "music"? C'mon... that's just noise!)
    2. Computers where one of my other passions (together with painting, photograph, reading, movies and studying foreign languages), so towards the end of the '90's when I had the opportunity to join an IT Company giving consulting services for a big banking group (big at least in Italy), I've been happy to take the opportunity and I started this journey. But I had a clear idea since the beginning: I wanted to be a developer. Writing software is a bit like composing a song or writing a novel: developers can create, something the IT folks can't do (well... they simplyput together bits created by someone else... is a bit like build a puzzle... it's not the same in my opinion)
    3. I like to play billiards, and we're lucky enough to have a billiard table at the office (in our recreative room), so almost every day after lunch we usually play goriziana and, well... with not so bad results...
    4. I grow up in the country, with lots of animals, but my favorite puppy if an Alaskan Malamute brought up named Jorg; well... "puppy" maybe it's not the most appropriate word for a 50 kilograms (110 Lbs) snow dog used for heavy work...
    5. I mentioned that I like reading (quite common hobby, I think), but I also like to write my own stories (thrillers and horrors in particular, my favorite writers are Stephen King, John Grisham, Michael Chrichton, Jeffery Deaver...). I won a few small writing contests some years ago, but I've never really tried to change this "hobby" in something more serious... but who knows, maybe in the near future...

    I think that's it, now it's my turn to tag 5 people, so here they are: Mark, Andreas, Todd, Jerry and David; now it's your turn!

     

    Cheers
    Carlo

  • Never doubt thy debugger

    ClickOnce fails to download updated files while they are accessible from IE

    • 1 Comments

    An interesting problem I had a few weeks ago was about an application deployed with ClickOnce; the auto update failed with time out errors even though the updated files could be reached successfully via Internet Explorer. Also, it appeared to be possible for Administrators to successfully auto update the application.

    A network trace showed that ClickOnce tried to go out on the Internet to reach the server from where to download from; ClickOnce didn't recognize the proxy settings for the user while Internet Explorer had no problems with that.

    After some digging into customer's configuration we found that they were using an IE policy deployed via Active Directory called "NoProxy" where the hosts were separated with commas (”,”) instead of semicolon (”;”). The ClickOnce technology seems to require more stringent proxy setting formatting and did not recognize the commas as separators.

     

    Cheers
    Carlo

Page 1 of 1 (3 items)