Wednesday, May 31, 2006

Launching a ClickOnce Application from another ClickOnce Application

Source: http://www.codeproject.com/useritems/ClickOnceLauncher.asp 

ClickOnce applications do a great job of isolating applications from each other. This was done for two reasons security and maintainability. Firstly it allows for greater security since the .NET framework manages security via code access policies. Secondly it increases maintainability by preventing the problems with "DLL hell". But this does pose a problem when one wants to launch the application. While it is installed on the hard drive the framework installs it in different locations for every user.

Microsoft solved this problem by creating a special type of shortcut, called an "application reference" that is used in the start menu when a ClickOnce application is installed locally. Great now we can launch an application from the start menu, but what if we want to launch it from another application?

To answer this problem I started where many of you are thinking I will just use the URL to the .application manifest file on the server. Just do a System.Diagnostics.Process.Start on the URL and I am good to go. While this will work find in an always connected scenario it doesn’t work if the application needs to run in offline mode.

For those applications I suggest doing a little bit of thievery. Since the application reference (*.appref-ms) that is created in the start menu will launch the application (if it is installed) for any user on any computer (with the .NET framework 2.0 installed) all we need to do is steal it out of the start menu and embed it in our launching application.

This technique is useful for applications that run in an online/offline mode. For online only application I suggest using just the URL.

The code

1.     Create the Client application

2.    

1.     Create a new Windows Application in VS.NET 2005

2.     Call it ClickOnceClient

3.     Publish it, with all the default settings

4.     Install it

3.     Find the application reference file from the start menu

4.    

1.     Using file explorer navigate to C:Documents and Settings(user)Start MenuPrograms(company)

5.     Create the Launcher application  

6.    

1.     Create a new Windows Application in VS.NET 2005

2.     Call it ClickOnceLauncher  

3.     Add the application reference file for the client to the project

4.     Set its "Copy to Output Directory" property to "Copy always"

5.     Set its "Build Action" property to "Content"

6.     Add a button to the form  

7.     In the click event of the button add a Process.Start for the file you just copied in

8.     Publish it, with all the default settings

9.     Install it

10. Run it

12:05 Posted in Blog | Permalink | Comments (0) | Email this

Friday, May 26, 2006

The untold story about Shawerma and Jordanian guys, no wonder why local girls hate us?!!

As usual it’s 11:30pm, and we parked our car infront of karam share3 mekka eating 3arabi and drinking pepsi getting ready for a long night of trix or code hacking!

Men don deolt sere, I asked the guys a small question: “ya e’7wan, what do you think about shawerma’s culture?” I got some owsome replies such as it’s a must, or Microsoft should create a shawerma arabi theme for msn spaces! hehe, others replied that 6al3et el shabbab hay wel 3arabi is better than spending time with their girl friends, yeah it’s time for you girls to know, and as for my friends’ girl friends don’t ask me for names coz I won’t bettrey my own sheleh! =p

Back to Jordev culture, I think you have to read this, Jordeis are writing poetry about shawerma 3arabi rather about girls, it’s not about being geeky, it’s about being Jordanian more! hehe a2olkom, iza el shabab kolha betbasbes 3al banat, bs enroo7 nakol 3arabi, wala law tomro2 Haifa Wahbeh bil mayooo ma7adan feehom rafa3 3eeno 3n sa7noo…

Ma bedi to waste your time so I’ll make it short, Jordanian culture = 3arabi, yer7am banat el balad, hehe; anyways we are going for a group 3arabi dinner on Friday June 2nd, so if you are interested to join us reply to this post: http://www.jordev.net/Home/tabid/36/forumid/6/threadid/33...

If you are looking for the poetry and discussion written about 3arabi in Jordev forums, check this post, try to skip the first 20 replies =)

http://www.jordev.net/Home/tabid/36/forumid/14/threadid/3...

PEACE

15:25 Posted in Blog | Permalink | Comments (0) | Email this

Tuesday, May 23, 2006

Windows System Reqs. 1990-2006: More For Less Old Post

Source: http://www.wininsider.com/news/?9331

The publication Thursday of Windows Vista's minimum hardware specs is only the last in a long series of requirement postings by Microsoft. To show some perspective, TechWeb compiled the Redmond, Wash. developer's stated reqs for each major Windows release since 1990's Windows 3.0.

Caveat: Microsoft is notorious for understating system requirements to pitch Windows to the greatest number, even when that minimum hardware has difficulty actually running the OS. JupiterResearch analyst Joe Wilcox characterized the habit this way on his blog. "You could run Windows on the minimum requirements, but you wouldn't want to."

As an additional comparison, average prices for desktop computer -- monitor included -- and portable PCs have been noted for all releases except Windows 3.0. (Data provided by IDC.)

While these "average" prices don't spec out systems identical to Microsoft's minimum requirements, they are a good indicator of what users paid for machines to run each OS.

It's easy to notice that as Windows' requirements got steeper, prices plummeted. A desktop able to run Windows XP (and probably at least parts of Vista), for example, costs only 42 percent of the price of a computer likely running Windows 95 eleven years ago. (Today's average notebook costs 45 percent of 1995's.) And that's not even factoring in the rate of inflation.

Here are the major releases for Windows, their release dates, and system requirements. Many of the trivia tidbits were gleaned from Wikipedia.

Windows 3.0 // May 1990

286 or faster processor

640K conventional memory (additional 256K extended memory recommended)

Hard disk drive

Hercules, CGA, EGA, VGA, or 8514/A graphics card (EGA or higher resolution recommended)

MS-DOS 3.1 or later

Mouse optional

[Tidbit: First Windows to be pre-installed on PC hard drives, by Zenith Data Systems and Dell.]

Windows 95 // August 1995

386DX or faster processor (486 recommended)

4MB memory (8MB recommended)

35-55MB hard disk space

3.5-inch high-density floppy disk drive

VGA or higher resolution (256-color SVGA recommended)

Average desktop PC price: $1,926

Average notebook price: $2,819

[Tidbits: 3.5-inch floppy version came on 13 disks; Brian Eno composed the Windows 95 start-up sound.]

Windows NT 4.0 // August 1996

Pentium or faster processor

16MB of memory (32 MB recommended)

110MB hard disk space

CD-ROM drive

VGA or higher-resolution display adapter

Microsoft Mouse or compatible pointing device

Average desktop PC price: $1,988

Average notebook price: $2,997

[Tidbit: Holds the record for most service packs -- 6, plus a post-SP "Roll-up" -- delivered for a Windows OS.]

Windows 98 // June 1998

486DX 66MHz or faster processor (Pentium recommended)

16MB memory (24MB recommended)

120-355MB hard disk space

3.5-inch high-density floppy disk drive

VGA or higher resolution (16-bit or 24-bit color SVGA recommended)

Average desktop PC price: $1,619

Average notebook price: $2,395

[Tidbit: Crashed catastrophically -- complete with infamous "Blue Screen of Death" -- during April 1998 COMDEX presentation by Bill Gates

" />
News | News Photos | Images | Web
" />
Bill Gates, who quipped "That must be why we're not shipping Windows 98

" /> News | News Photos | Images | Web

" />
Windows 98 yet."]

Windows 2000 // February 2000

133MHz or faster Pentium-compatible

64MB of memory

650MB free hard disk space

CD-ROM or DVD drive

VGA or higher resolution monitor

Keyboard required

Average desktop PC price: $1,306

Average notebook price: $2,167

[Tidbit: First Microsoft OS to make it through development and release without a code name.

Windows Millennium // September 2000

Pentium 150MHz processor or better

32MB memory

320MB free hard disk space

CD-ROM or DVD-ROM drive

3.5-inch high-density floppy disk drive

Video adapter and monitor that support VGA or higher resolution

Microsoft Mouse or compatible pointing device

Sound card

Speakers or headphones

Average desktop PC price: $1,306

Average notebook price: $2,167

[Tidbit: Usually considered the "dog" of Windows, Millennium's moniker of ME was said to stand for "Moron Edition," "Migraine Edition," "Malfeasance Edition," and "Many Errors."]

Windows XP // October 2001

Pentium 233MHz processor or faster (300MHz is recommended)

64MB of memory (128MB recommended)

1.5GB free hard disk space

CD-ROM or DVD-ROM drive

Video adapter and monitor with Super VGA (800 x 600) or higher resolution

Keyboard and a Microsoft Mouse or some other compatible pointing device

Sound card

Speakers or headphones

Average desktop PC price: $1,163

Average notebook price: $1,876

[Tidbits: First Microsoft OS to require "activation;" metamorphosed into more variations than any other OS, including Home, Professional, Tablet PC, Media Center, N (specifically for the European market, sans Windows Media Player), Starter, and Professional x64.]

Windows Vista // ??

[Premium Ready]

1GHz 32-bit (x86) or 64-bit (x64) processor

1GB of memory

Graphics processor that runs Windows Aero

128MB of graphics memory

15GB free hard disk space

DVD-ROM drive

Audio output capability

Internet access capability

Average desktop PC price (2005 data): $801

Average notebook price (2005 data): $1,256

[Tidbits: Longest development track of any Windows OS: first announced in July 2001, prior to XP release; first Microsoft OS to be named in lawsuit before it launched.]

http://news.yahoo.com/s/cmp/20060520/tc_cmp/188100630

15:05 Posted in WinFX | Permalink | Comments (0) | Email this