Search...

Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

3 October 2012

Powershell XML Configuration Files.

Recently I have been playing with Powershell and while I still prefer Bash as a shell (long time user) I was impressed with the amount that can be achieved with Powershell.

One of the things that I was looking at doing was automating our build process as we had hit a css file count limit in Internet Explorer (31). I should point out that our css is not that badly laid out but we load specific css files dynamically based on the client's needs. So my aim was to minify our css with the Ajax Minifer tool which can be found on Codeplex. The only issue with our current development set up is that my co-developer hosts his svn working directories on a different drive to mine so I needed to provide a configuration file to specify the path to Ajax Minifer and our code.

Turns our this is really easy in Powershell as it can natively parse XML and provides a nice tree structure to use. The following reads, parses and provides the XML configuration file as said tree :

# read the local config file for various settings ...
$cfgFile = "$PATH_TO_FILE"
$root = "$NAME_OF_ROOT_NODE"
$cfg = [xml](gc $cfgFile)

At this point you have access to the child nodes through $cfg. For example $cfg.$root.EnableDebugging -eq "True" returns the value of the <EnableDebugging> child node and check's whether it's value is set to True.

As with all scripting and shells there appears to be more than one way to achieve this but it works perfectly for what I needed.

24 October 2009

20 September 2009

Verity Stob - Abigail's Windows 7 Party

After what has been a very long week in one way or another (both at work and at home) Vertiy's latest aritcle had me in stiches.

I guess that could be another sign that I am slip sliding my way to middle age but I did and still do find Abigails party an excellent play. The fact that the rather excellent Verity has made it a basis for her Windows 7 Launch Party piece was perfect.

Can for the life of me imagine where Microsoft got the idea for a launch party drive from!

16 June 2009

Boycott Opera

This is a link to the new Boycott Opera campaign which a Windows user group has started due to Opera's suit again Microsoft.

The most interesting thing on the page at the above link is that IE is listed as a great alternative to Opera. Having to use IE everyday at work I would disagree but that is just a personal opinion!

Now I don't think people realise why companies are going after Microsoft about the issue of bundling IE with windows. This argument has been raging for a few years now and I think that the main point is that Windows is shipped by default on probably over 95% of all new pc's. Microsoft where the "in the right place at the right time" company that brokered deals with the hardware suppliers to ensure that their operating system was the one that was shipped and ensured it was in the hardware suppliers favour to do so. At the time (once they had dealt with IBM) there was no competition.

Now there is some competition. Both in the OS market and in the software market. We only have to see how Microsoft likes to spread untrue and unfounded rumours about Linux and how they attempt to gain a grip on markets (Office document format?). Unfortunately, IT users, directors, developers etc are all finding that Microsoft is not the only solution but rather there are cheaper and better alternatives available. Although sometimes Microsoft is the answer there is no denying.

Internet Explorer is not the best browser in the market place. IE attempted to do to the web what J++ was going to do to Java, make the target language (or in this case web sites) Microsoft specific. Luckily for the world, the internet was to far advanced by the time Bill and Steve decided they better pay it some attention and standards had been developed to ensure that it remained a "Standard and Open platform".

Now I read IE 9 will be the most standard compliant browser ever. As I read IE 8 was going to be. IE 8 has had to ship with a compatibility mode to ensure it can render pre IE 8 pages correctly. This is to rectify the issues that IE 1 through 7 caused in it's rendering engine.

I have two main thoughts on the whole subject. The first is that I applaud Opera for taking the stance. It could have settled and from what I read Microsoft wanted to settle quickly and quitley. However, what Opera are really fighting for is not so much IE to not be bundled with Windows but rather the strangle hold on the entire OS market that Windows has.

My other main thought is perhaps if Microsoft where to provide a true standards compatibly browser and adhere to standards rather than try and dictate and "own" all technology available the perhaps Opera and other browser developers would have no need to have issues with IE as all pages would render equal.

Now if only IE would move to webkit.

13 February 2009

How Microsoft Gets It So Wrong.

This is not a post about how Linux is great and Microsoft is rubbish. Anyone that knows me will know that I base my opinions on what I believe to be technically better. Hence why I switch to Linux a long time ago.

However, by day I hack on .Net which until I get around to getting a new work laptop set up with an image running in Virtual Box means I have to run Windows. I refuse to use the inept Vista and have stayed loyal to XP.

Today I have suffered a second bout of Microsoft's in ability to package software correctly inside a week. I guess unless you have encountered apt, rpm based installs or pacman you don't realise that in fact you don't have to suffer the way Windows software is packaged. Anyhow I digress....

Last Friday I attempted to remove Virtual PC 2007. I had it installed for creating an image for an Indian developer I _had_ to work with for a short period who was not willing to use anything that was not made by Microsoft. I no longer needed it and thought I would uninstall it. The uninstaller hung..... for about 20 minutes before I finally killed it and shut the machine down and thought I will deal with it another time. Indeed I did need to deal with it...... the next time I turned it on in fact as it had wipped my VPN network connections!!

WTF.... How can uninstalling Virtual PC wipe my vpn's. Anyway.... I reinstalled and carried on.

This morning I turn my laptop on before jumping in the shower (I sadly have a structured morning routine!) and came down to find that Windows update has downloaded an update and restarted my machine after installing it. Only it has managed to uninstall my wireless driver!!

WTF ... I know it was working because pre shower I was on my mail. Post Windows Update reboot I have no driver. There is no excuse. I have not got some unusual hardware/software combo. I have a bog standard Atheros card running under XP sp2. Why on earth would some update they are pushing down the wire require it to mess with drivers anyway.

I'm sorry but this shows how technically inept Microsoft are these days. It's a shame for the talent that work there that the company as a whole is turning into an embaressment.

I'm a PC and I __don't__ want Windows!

4 February 2009

Windows Needs Root!

This is an article about research done by BeyondTrust Corp.

It shows that of the issues it study reported against Microsoft Products 92% could have been either useless or less destructive if the user was not running with admin rights.

This was one of the great things that drew me to *nix systems as it just makes sense.

29 September 2008

Bluetooth Headset

As I work form home at least 3 days a week I communicate with the office via Voip. This is usually either the Voip built into Messenger Live or Skype. Up until recently I was using a Plantronics headset which was great even if I did look like a pilot. I decided that the time had come for a Bluetooth headset as the Plantronics one was on it's last legs.

It arrived Saturday and after a stressful Sunday night trying to install the drivers under Windows (as in I had to reinstall drivers for nics, stop and play with Bluetooth services etc) I can fully recommend that no one use a bluetooth headset under XP service pack 2. It's hideous, painful and one of the many reasons mortals hate PCs.

And whats worse is that now I have it working the quality is rubbish. I am going to plug my "preferred" laptop in and see if under Linux it's any better.