Installing Visual Studio 2008

UPDATE: I found a fix. See here.

Right. Let get this straight. I’m running Vista Business with Visual Studio 2005 Standard installed (and All the extras – SQL Server etc).

The short version is that Visual Studio 2008  Professional refuses  to install itself. It installed .Net 3.5, Document Explorer 2008 and the Web Authoring Component and then quit at some point while installing Visual Studio itself.

Heres the error log:

Microsoft Visual Studio 2008 Professional Edition – ENU: [2] ERROR:Error 1935.An error occurred during the installation of assembly ‘Microsoft.VC90.DebugCRT,version=”9.0.21022.8″,publicKeyToken= “1fc8b3b9a1e18e3b”,processorArchitecture=”x86″,type=”win32″‘. Please refer to Help and Support for more information. HRESULT: 0x80070BC9.

I’ve no idea what is going on. If you Google search  the Error Code you get this error for VS2005 (or SP1), .Net 2 or SQL Server.  Searching by HRESULT points to this MSDN Forum where the discussion is about a VS2008 Compile problem.

Now here’s the thing. It installs perfectly on my laptop (also running Vista Business with Visual Studio 2005 installed with all the bells and whistles). So the download ( and no, its a perfectly legal copy) is definitely not corrupted.

HELP!!!!!

Its Been a While – WHS Add in

I’ve been off ill. Pretty badly in fact, which is why  haven’t posted. or done much programming.

I’m adding the finishing touches to the service – mainly making sure it won’t crash itself or the Server and that it actually does what I intend it to do.

So I’m gradually turning my attention to the scheduled task that will upload files. This is a nightmare mainly because of the large number of possible scenarios. These mainly have to do with updated files. It depends what has changed – the image itself (i.e. after a trip through Photoshop or Elements) or the metadata (keywords, tags, etc).

I’m also getting to grips with the settings and console tabs in terms of what will go where. I tend to try to nail down the user interface first in my software projects so that I know what user interface logic needs to be implemented. No use writing lines of code that, although doing something quite logical and correct, turn out not to be needed.

I’ve yet to forget about this little project- just wish Omar Shashine would release his code for his Send to Smugmug App. Don’t forget to check his site for the latest version.

Microsoft-Yahoo

I was thinking about the merger this morning and it struck me that the model tech merger is… Adobe’s buyout of Macromedia for $ 3.4 billion.

Now it is nowhere near the size or complexity of the Microsoft merger offer. But the point is that both companies brought their software together to create the Creative Suite series.

I mean think of it, different software, different programming, different programming culture, ethics and architecture.

Now I currently have CS3 installed. Its quite amazing how Macromedia’s software ( Flash, Freehand – now Illustrator) works quite well with the rest of the suite.  My point is that it works, not that its amazing ( which it is).

In similar vein, Yahoo and Microsoft are totally different companies. 

The problem isn’t the technology. The different technology might be good, it’ll force Microsoft to take another look at Linux. The problem is the people, the culture. No matter how good your team may be, they’ll never turn out anything is they can’t work together.

Getting the two cultures to play nice is simple: phone up Adobe and ask who their  consultancy company was in 2005 for the merger, and hire them 🙂 . Or hire, Jim Rohn, Antony Robins, and Tim Berners Lee. As teams are integrated, send them off on a team building course or something.

Now, is $44 Billion too little for Yahoo! ? The board seems to think so. Forget the “only logical option” argument for a second here and think it though. As Kara Swisher said it:

Indeed, some think that if the company was managed more aggressively–and that has been a big if at Yahoo for far too long now–Yahoo shares could be trading closer to $30 a share.

And that makes $31 kind of a bargain.

It’s not such a leap of faith, in fact.

Many mid-level and senior Yahoo execs have told me that CEO Jerry Yang’s too-cautious approach has been the problem and that there was pressure building for a change

In fact, the more you think about it, the more it sounds as if Microsoft have jumped the gun looking (hoping?) for a quick deal.

Now for the de rigueur Scoble quote:

“Are they crazy?”

I said “probably, and arrogant too.” Then she wondered why they would do such a thing. I told her that I agreed with Philip Greenspun, who says that to reject this deal is lunacy. Since I know Yahoo’s board members aren’t lunatics, I figure there must be some other answer. I told Maryam “they are probably trying to see if the offer will go up.”

Yahoo! are playing a high stakes poker game. the winners get bask in all their glory for the next few decades and losers look for new jobs.

If you are going to pay money for something – make sure that you get your moneys worth. If Microsoft think that they are going to get Yahoo on the cheap ( relatively speaking, that is), they need to rethink their attitude. Yahoo is worth shelling out for, but is above being treated like a second class citizen.

And If Microsoft have such an attitude with Yahoo!, any merging will be a disaster. Yahoo’s minds (linux or not) will leave and the empire will suffer ( sounds like Star Wars). Microsoft will be left with a rotting hulk that will drain money and resources for no observable gain. It’ll be like Alice in Wonderland where she has to run faster  and faster to stay where she is (the translation being that Yahoo will require more and more to stay  the same).

So although this sounds like a 7 Habits lecture, Microsoft’s attitude will determine how this ends up.

In the words of the immortal Spiderman:

With great power comes great responsibility

WHS and SmugMug- Architecting the Add-In

The structure of an Add-In is important to what we are trying to accomplish here.

I could put all my code as part of a Console Tab and have people manually getting it working.

That would no doubt work, but its kind of lame and falls short of expectations.

So we want an application that reacts in real-time to folder and file changes, but is also able to be scheduled ( say for 3am after a defrag or back-up session).

This requires a number of different application blocks, each an application in its own right.

To see how an Add-In works in code, the WHS Photo Uploader for Flickr is hosted on Codeplex. Unfortunately its a totally different application for a totally different service. But I did get a good look at the Console and Settings Tabs to see what the code would/should look like.

If you want to download and run it, I’d download the WIX Installer XML for Visual Studio 2005 to allow the  Add-in’s installer to be recognised by VS and compiled.

So the lesson is that Console Code is run from the Console (doh!) and any file monitoring code will only work while the console is running.

So we’ll require a service to be running to monitor our gallery folders and record the events to our Master XML file. Hence this application will consists of XML code and our FileWatcher Object. It will need to use the Windows API to allow it to be installed and run  as a service.

Then, we want to schedule our uploads so that they are not taking over your broadband connection. We could use System.Threading to calculate the number of seconds remaining and have the timer call our upload method once the time is reached.

However, we want to keep things as simple as possible. This means using windows’ Scheduled Tasks to call our uploader (an exe file). Scheduling Tasks is for some reason not in the .Net Framework 2.0 so we’ll use a library to wrap all the C++ Interop code. There is a CodeProject article here on it with the library. This also means we can run tasks with a users username and password (i.e “Administrator” and whatever the password is) so tasks will run, in theory, even when no one is logged in.

So we have three applications here, all rather trivial:

  • The Console Tab and Settings Tab with code for usernames/passwords as well as rescheduling uploads and manually starting the uploader. I have the idea of getting album stats and displaying the charts by using the Google Charts API, but that’s for version 1.1.
  • The Service app that will take file and folder change events and writes them to our Master Settings file. This runs independent of any user being logged in.
  • The Uploader that is scheduled to run at such and such a time to execute the events in our Settings file on the server using he SmugMug API. Also runs independent of any users being logged in.

Slowly but surely the Add-in progresses.

File Sharing- Oh the Humanity!!!

Via Hugh MacLeod – who did a cartoon about this.

The IFPI – the International Federation of Phonographic Industries – is the global music industry organisation whose very name tells you how long ago progress overtook it. On Thursday it published its digital music report for 2008, which says boldly that “the spread of unlicensed music on ISP networks is choking revenues to record companies and investment in artists, despite a healthy increase in digital sales in 2007, up approximately 40% on the previous year”. (If you’re wondering, those sales were $2.9bn (ÂŁ1.45bn) for the year, including ringtones.)

The IFPI’s solution? Sort it out at the internet service provider level. “ISP cooperation, via systematic disconnection of infringers and the use of filtering technologies, is the most effective way copyright theft can be controlled. Independent estimates say up to 80 per cent of ISP traffic comprises distribution of copyright-infringing files.”

You know what I say? Damn right. Let’s get ISPs to stop copyright infringement. But, um, music people? Better form an orderly queue. You think you were the first to suffer from your content getting ripped off and spread to the four corners of the earth? Get to the back of the line, bud. There’s a few people ahead of you.

 

Read the rest of this fine article here.

WHS and SmugMug – Keeping Track of Files

The question that has to be asked at the beginning of every software project, hobbyist or commercial is: “What are we trying to achieve here?”.

For this project, the aim is to move all the contents of one folder to a gallery on SmugMug – and keep them up-to-date. This means that modifications ( tags, edits, etc), additions and deletions are replicated on the gallery in question.

This requires two things:

  • The program to be aware of what is happening to those folders
  • And for the program to be aware of what has already been uploaded.

Number one requires a FileWatcher Object from System.IO.

The Filewatcher throws an event for creations, deletions  and modifications. This allows us to determine the nature of, say, a create event and decide if its a file or directory that has been created. Based on that we can take other action.

We do this by calling System.IO.Directory.Exists(string path) that returns a boolean. You could use the File.Exists(string path) method as well.

Second, a running tally has to be kept of what is going on. We do that by maintaining a master file in our root directory (say \\Photos\SmugMug)  and child files in each directory. The actual directory may or may not be exposed as a setting via the Console.

The master file is essentially has a queue of file events to execute on the server the next time its syncs. This stops large file  ( i.e. large numbers of files) operations overloading the server (resulting in multiple create events) as Demigrator.exe is working on those files as well. So better  to queue the uploads to take place when the disks are idle. I’m using XML and handwriting the read and write procedures – you’ll understand why at the end of the post.

The second requires a file in each directory with the SmugMug Gallery ID and  a list of each file and its SmugMug ID in that Directory. This allows us quick access to files instead of iterating over the lot and comparing each file to the one on SmugMug.

As far as scheduling the uploader is concerned, I haven’t gone into that in too much detail. I could schedule an exe to run using the task scheduler. Its not a bad way of doing things. Norton Internet Security does just that for its scheduling. That, of course has a disadvantage of spitting up the add-in into a logical front-end and back-end.

And by the way, I’m writing this in Visual Studio 2005 using C#. I’m going to do a second version in C# Express 2008 (to use LINQ-to-XML, mainly) for a comparison.

WHS and Smugmug 1

The first thing I looked for after signing up for SmugMug was a WHS Add-In since there is one for Flikr. Lo and behold, there isn’t one.

So last night I started writing an application architecture post when it occurred to me that the best way of explaining it was to write a program from scratch.

Enter the SmugMug Add-In idea. So I’ll be doing that in a short series of posts.

First things first, I haven’t decided whether to use Visual Studio 2005 or Express 2008.

Second, the WHS SDK is already in your servers’ Program Files\Windows Home Server folder, so don’t bother looking online for it. You’ll need these two files added as references in Visual Studio ( or Express):

  • HomeServerExt.dll
  • Microsoft.HomeServer.SDK.Interop.v1.dll

Third, the Smugmug API can be downloaded from SmugMug.com. And it looks to be rather straight forward to write code against it (Note – I always say that looking at an API for the first time, then regret it later). And you’ll need an API key from SmugMug. And you’ll need to add the API in as a reference in Visual Studio or Express.

For a quick look at it, Evan Leventhal’s .NET wrapper SmugMug.NET, is a good start.

Fourth there the way the program will work is pretty straight forward :

  • The folder name can be the name of the gallery OR an XML file in the folder will identify which gallery it corresponds to (that is the SmugMug Gallery ID) ala SyncToy.
  • Since I keep far more photos than I post in \\Server\Photos,  it would be a good idea to create a separate folder containing all the gallery folders for syncing.
  • As far as checking the folders themselves, the .Net 2.0 has a FileWatcher object ( or something to that effect).
  • A settings tab will have a list of folders in the gallery folder that will be synced by default unless you uncheck it.
  • As far as a console tab goes, I have no idea – stats, gallery browser, etc.
  • And scheduling of some sort, could do somthing ala SyncToy (and no, I’m not french).

I’m writing this primarily for myself  as I’m fed up with having to Remote in and use the Send To SmugMug shell app but it will be packaged neatly and on Codeplex once its finished, I imagine.

MacWorld Fallout

iPod Touch update downloaded and installed. Add-on purchased.

I’ve only had a cursory look at the features. And boy do they rock. I was going to say that I really needed a Notes app and his Steveness has gone ahead and stole my thunder. Not that I’m complaining 🙂 .

The Add-on was cheap when I think of the iPod classic owners that I know – they are going to really  be envious.

I’m currently looking at my new Dell Inspiron and wondering who I might sell to get an Air (yes, who).

While I think that one over here’s a Youtube clip making fun of the OTHER software company in action:

Media Centre or not?

The issue of streaming media (TV, Music, Photos) across a network really zeros in on the reason for having a home network.

For those of you who read this blog, you’ll know that I’ve been trying out SageTv for Windows Home Server. And it works great, if you set aside the EPG issues. Recorded TV is of high quality, crisp and clear; and watching from a SageTv Client is only slightly spotty (mainly due to the server being busy and the wireless connection).

My problem is two fold. One WHS is actually a server and is busy all the time and only has a Celeron D.

Two, SageTV shows only play in SageTv itself or in Real Player. Requiring re-encoding to watch via WMP11 or for use in Movie Maker. Which is a pain since a 27 minute show comes out at 650MB at Normal quality and takes about 4 and a half hours for Windows Media Encoder to process.

The EPG issue that I’m encountering means that the Program Guide only has info for about 4 channels out of 24. It is irritating in the extreme since identifying shows requires that you watch them. UK EPG support is quite spotty the forums tell me.

The solution to all of this is, I think, a Media Centre PC. A dedicated hardware device. The whole point of dedicated hardware is to share the load. My broadband connection goes though a router instead of a PC. A GPU handles 3D graphics instead of a normal, general purpose processor. In this case, WHS can stick to the business of serving files and taking backups and let the Media Centre take the load.

I’ve only heard positive reviews for Media Centre Edition (XP) and it seems pretty good. On top of that, Microsoft has a good strategy as far as extenders are concerned such as the Xbox 360 and so on. Also it should slip seamlessly into an all-Microsoft network.

I’d be using WHS for Storage, and WMP11 to watch the content on a PC. It also makes the purchase of a 360 more likely (I’ve been sitting on the fence lately and can’t decide either way).

To actually build the hardware, I’d use the same method that I did for my Windows Home Server. Order the shell (Chassis, power supply, motherboard, processor(s), hard drive) from Dell and then order the rest of the kit from Amazon.

The thing is, how much juice do you need in a Media Centre? SageTV uses about 15% CPU at record time and not much RAM.

Dual Quad Core 2 might be pushing it a little far. A single Core Duo 2 might cut it, but then again, you don’t want “might” to be anywhere near your Media Center. Specially since after-market upgrading can be extremely expensive for hardware like this.

RAM is dependant on whether Vista Media Centre is 64-bit. I’d say that 2 or 4 GB is safe enough.

The next thing is required for this is, well, a network. Streaming media over wireless is Ok if its small enough and you are close enough to the Access Point to get the and excellent signal ( In my house that practically means sitting right next to it). For real media streaming, you need Gigabit Ethernet. More on that to come.