Saturday, January 19, 2013

Creating a distribution package (.msi) for you VS project

Creating a distribution package (.msi) for you Visual Studio project

So you created a nice application in C# and want to share it with the world.
One way to do it is by creating a distribution package. By doing so Microsoft helps you by adding a few features to your setup process. I'll show you a few in the step by step.

First add a new installer project to your solution.
I choose Visual Studio Installer -> Setup Wizard which can be found in Setup and Deployment category

Visual Studio Installer
Visual Studio Installer

 Follow the wizard, its fairly simple.
Visual Studio Setup Wizard - Step 1


 Choose the project type you wish to create.

Visual Studio Setup Wizard - Step 2


Choose the project output you wish to use.
I usually select "Primary output from <Project>" as in the sample image below.
Visual Studio Setup Wizard - Step 3


The next page allows you to select files to add to the distribution.
The files can be a readme file, nfo file, images or whatever else you want to add.
Visual Studio Setup Wizard - Step 4
The final page is the confirmation.
At this point your done creating the simple package.

Adding Prerequisites to Installer

Sometimes, your project requires prerequisites to run correctly. The most common prerequisite is the .Net Framework itself. The Visual Studio Installer allows you to add the prerequisites with your distribution thus helping the user install the application correctly and your program run smother.

To add prerequisites, go to the setup project and open the properties.
Notice the Prerequisites button on the lower right.
 
Visual Studio Installer properties

After clicking the button, we can add the relevant items.
In my case I choose the .NET Framework 4 Client Profile so in the case that the user didn't download in advance, the .NET Framework, the Installation will help the user do so.
Notice that you can choose from where you want the component to be installed.
Either download from the vendors website (usually Microsoft) or from the location of the application. The same location means that the prerequisite will be bundled with your program making the install file larger.
I've never found much use for the third option.

Visual Studio Installer Prerequisites

Creating a shortcut to the application

One of the most important things an installer needs to do is add a shortcut to start up the application, we wouldn't want the user looking for the application all over the filesystem :-)

Go to the Install Projects' File System Editor. You can find it by selecting the Installer project from the solution explorer and notice the new icons at the top of the solution explorer. The file system editor is the second from the left.

Select the Application Folder
You should see the "Primary Output ..." in the window beside it.
Right click on the "Primary Output ..." and select the "Create Shortcut" option.
Now you can drag the new shortcut to the User's Desktop or the User's Program Menu.
I usually rename the shortcut as well.

Visual Studio Installer File System
The Installer has loads more features, if you find any good ones, leave a comment.

Monday, January 7, 2013

Adobe Creative Suite 2 free and legal


Lifehacker Posted today on their twitter feed that Adobe is offering free downloads of Creative Suite 2 (http://lifehacker.com/5973750).

 Basically it includes old versions of:
  • Adobe Creative Suite CS 2
  • Acrobat 3D
  • Acrobat Standard 7.0
  • Acrobat Pro 8.0
  • Audition 3.0
  • GoLive
  • Illustrator
  • InCopy
  • InDesign
  • Photoshop
  • Photoshop Elements
  • Adobe Premier Pro
These old versions are quite good and will match most of the casual users needs so it is a great catch.
The only problem is that within hours of the post, Adobe took down the download link and the reason is not very clear.
Either the amount of traffic on the adobe site was to much or they wanted to back down from the deal.
In any case, the link itself to the download is down(https://www.adobe.com/cfusion/entitlement/index.cfm?pid=4485850&e=cs2_downloads).

Slickdeals did step up to the plat and posted the direct links to the downloads from the Adobe site for us
http://slickdeals.net/permadeal/87488/adobe-adobe-creative-suite-cs2-standard-pc-or-mac-digital-download

download before the links go down as well.
A list of all the serial numbers can be found here http://pastebin.com/sDbdRLAN

Sunday, January 6, 2013

VTx and VTd on an HP Compaq 8200 elite machine

As I was setting up VMWare on a new system at work, I received an error stating "Virtualized Intel VT-x/EPT is disabled for this ESX VM" which I immediately translated to, I forgot to enable VT in the machines BIOS.

The Machine itself is a nice HP Compaq 8200 elite (fully loaded with graphics and memory).
After a simple restart I waited for the Bios advisory stating which button to press but the OS just booted up.
It seems that HP skipped the detailed boot screen to discourage home users to mess with these setting themselves.
A quick google search returned the solution to just press F10 after restart repeatedly until BIOS screen is received.

The BIOS itself is pretty simple, even too simple.
I have edited many BIOS's but for some reason for the HP compaq 8200 elite, could not find the VT settings.

Searching google again I found a lot of references claiming that if its not found the machine doesn't support VT.
Now This is so FALSE. We spent a lot of money on a machine with an i7 CPU and powerful motherboard just for that reason.
So i continued looking and found the setting.

Usually I don't post about simple Bios settings locations but since there was so much disinformation out there I felt the need to share the simple location.

To Turn on VTx and VTd on an HP Compaq 8200 elite machine,
1. Boot machine
2. Press F10 repeatedly until entering BIOS screen.
3. Go to Security Tab
4. Select "System Security"
5. Set Virtualization Technology (VTx) to enabled
6. Set Virtualization Technology Directed I/O (VTd) to enabled
7. To apply and save changes, select File > Save Changes and Exit.
8. Your done. restart and everything should be fine.

Good Luck.