Tuesday, September 29, 2009

Broken zip / archive extension in Windows Vista

So I was playing around in Vista and purposely, by accident, associated all my Zip files with a WinRAR program. After removing the WinRAR app I figured that the associations would restore to the defaults of Vista, WRONG....

So if you're faced with this issue here's the fix.

In Vista
goto Start
and run "cmd /c assoc .zip=CompressedFolder"

All the default Zip file functions should be back to good Vista style.

Cheers,

Monday, September 14, 2009

Locked remote desktop sessions

So I'm home playing in my geek sandbox and wouldn't you believe it the darn server is locked up with too many open RDP sessions. Since I'm the only one jumping in and out of it I have only my self to blame. One for not setting session limits to auto end sessions after XX hours and two for just being plain lazy.

I would just go warm boot the server but the last ihad a power surge I lost my OS hard drive and half of my great Lisa Ann collecction. So here's a tip to a quick fix if you'd like to remotely solve this remoting issue!?

Open a CMD prompt
(Vista OS) mstsc /v:<hostname or IP> /admin
(XP OS) mstsc /v:<hostname or IP> /console

This command will override the session limit error and get you into the box in question so you do the necessary cleanup.

Holla!

Thursday, June 11, 2009

The Case of Server Side Includes in Sharepoint Continued

So here's the deal in my first article, "The Curious Case of Server Side Includes in Sharepoint", I described how to use XML Web Parts to include HTML pages into Sharepoint. These pages only contained HTML Tags and Javascript, soon after that I had to figure out a way to include Server Side Scripts ie. classic ASP or PHP.

Sharepoint is built on .NET and all you hear is how superior it is to classic scripting techniques but personally its been very hard to retrain my brain not to follow my scripting talents. So here's a crutch for you other script junkies out there that need to add there existing work into Sharepoint today.

So for this you'll need a Sharepoint site, and IIS or Apache server (to host your scripts). I've done some testing and if you own your Sharepoint Server then you can install other Sites under IIS that are ASP supported sites. If you don't own the Sharepoint server then this will also work for Web Servers on another machine.

  1. Write your script as you need it to run (test/debug).
  2. Build your tables, divs, spans or whatever format stuctures as if they were linked to the CSS that the Sharepoint page is linked to (this will maintain the look and feel).
  3. Once you've tested the script wrap the following XML tags around it:
    <?xml version="1.0" encoding="utf-8"?>
    <HTML><![CDATA[
    YOUR SOURCE CODE HERE
    </HTML>

  4. Insert the XML Web Part where you want the script content to appear.

  5. In the Web Part Properties set:
    XML Link = http://<URL>/<Filename>.asp
    Appearance
    Chrome Type = None

  6. Save/Close your file and you now have a Server Side Script include.

I know I'm supposed to be promoting growth into the newer technology but I'm an old dog and sometimes you just need to get stuff done, minus the learning curve. His a bone for the dogs to get by one more day until the light switch of .NET comes on.