Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Deploy visual studio 2008 windows application
 

Deploy visual studio 2008 windows application

Hello -

It is my understanding that the .application file in the main part of a project (not in the version folders) is really the executable. I have successfully put a desktop shortcut pointing to that application and can update my application on user computers. My question now is, where is it running from? If I put this executable on 300 user computers, would they all be running the app from the server? Is this a viable solution? All users will have the app opened and be working in it all day.

All machines have .Net framework 3.5 and arerunningwindows XP. The application server is Windows 2003.

With VB6 apps, I always just deployed apps with a shortcut to the .exe that I placed a copy of on user desktops. I could then just update the .exe file with any changes and all shortcuts would point to the changed version.

Would the above shortcut to the .application file be a comparable solution? I don't quite understand the architecture here.
Shannon10  Saturday, August 15, 2009 4:09 PM

Is your application deployed "online" or "online and offline" ? I assume you are deploying it to the server; is it a web server? Is your installation URL a http: address?

If it is deployed as "online only', then when the user installs it, it will provide the desktop shortcut for you.

If you are deploying it as "online/offline", you can create your own shortcut by clicking the box in the deployment properties. You can also do it programmatically, but why, if you are using .Net 3.5, although this may be an SP-1 fearure.

http://robindotnet.wordpress.com/2009/04/07/creating-a-desktop-shortcut-for-a-click-once-application/

You don't want to create a shortcut to the exe file because (a) it won't run it as a ClickOnce application, and (b) the location changes every time there's an update.

I'm not sure why you need to create a desktop shortcut when ClickOnce will do it for you.

RobinDotNet



Click here to visit my ClickOnce blog!
RobinDotNet  Monday, August 17, 2009 6:28 AM

Thanks for the response!

It's deployed as "online and offline." It is being deployed to a fileshare on our application server.

The reason I wanted to create my own shortcut is because I do not want the exe in each individual's profile. Our users change machines quite often (I know it sounds strange, but management has a real good reason for doing this). Since they are constantly changing machines, they would have to constantly loadall ClickOnceprograms each time they change workstations.

Ineed ashortcut that shows up on the desktop of All Users. That's what I used to do with VB6 apps.

The file structure for a test app I ran is as follows:

Demo ClickOnce
Application Files
Demo ClickOnce
Demo ClickOnce.application**
Shortcut to Demo ClickOnce.application
*
Demo ClickOnce.sln
Demo ClickOnce.suo
publish.htm
setup.exe

Demo ClickOnce_1_0_0_0,Demo ClickOnce_1_0_0_1,Demo ClickOnce_1_0_0_2,Demo ClickOnce_1_0_0_3, etc. are in the Application Files folder.

The shortcut I created, Shortcut to Demo ClickOnce.application*, which I put in All Users/Desktop on a test machine, points toDemo ClickOnce.application**. It does update on the test machine when I publish a new version on my developer machine.

My questions are:
1. Where exactly is the app running from?
2. If I put this shortcut on 300 user machines, would they all be running the application from the server and is that a viable solution? All users will have the application opened and be working in it all day.

Shannon10  Wednesday, August 19, 2009 8:45 PM
I hate to break this to you, but if they click on the shortcut and it invokes the application file, it is going to install the application under the user's profile. There is absolutely no way to avoid that. The point of ClickOnce is to install under the user's profile to avoid impacting anything else installed on the machine, and to avoid having anything else installed ont he machine impact the ClickOnce installation.

So you are basically wasting your time with the shortcuts.

I could recommend using an msi package and installing the application for all users rather than using ClickOnce.

You can also just xcopy the deployment folder to the server and link to the exe file, but running across the network is not performant, and will also impact the performance of your server.

And your other choice is to just have everyone use the same account on the machine.

Are you in a terminal server environment? Is that the problem/issue?

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Thursday, August 20, 2009 9:47 AM

Thanks, Robin.

I was really looking for a better way than to install using an MSI because of update issues. The people who requested the application ALWAYS ask for additions to programs.

The network people can push out an update for me, but I have little control over it; in other words, it would be pushed out at some hour like 3:00 a.m. and I wouldn't be able to test it before the next day.

. . . . . "With VB6 apps, I always just deployed apps with a shortcut to the .exe that I placed a copy of on user desktops. I could then just update the .exe file with any changes and all shortcuts would point to the changed version." . . . (from my previous post) - That's how we always did it in the past. I know it wouldn't work for 10,000 users, but can you give me some ballpark figure of how many users would have a substantial impact the server?

Server info:

Intel(R)Xeon(R)CPU
5130 @ 2.00GHz
2.00 GHz, 1.99 GB of RAM

Microsoft Windows Server 2003 R2
Standard Edition, SP1




Shannon

Shannon10  Thursday, August 20, 2009 4:01 PM
The question about your server performance isn't one that I can answer. You can always install it on the server and have them run it from there across the network, and see how it works. When it starts to look like a problem, you can rethink it at that point.

You could also roll your own installation. You could keep a manifest of the files and versions, then compare against the server when the user runs the application and if there's a new version, have a separate exe run that does the update and then re-runs the application. I've done this before, and stored the version in the database, but you could just put it in a text file. If you do this, you can just xcopy the files to the server, then copy them over to each machine when you need to.

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 01, 2009 3:51 AM

You can use google to search for other answers

Custom Search

More Threads

• install latest version of product without uninstalling previous version
• Cannot create folder
• Detecting InstallAllUsers value
• Windows Installer & Legacy DLL's (VB6)
• Web Server in Domain, Non-Domain Users
• Use and deployment of a custom application framework
• optional components updated every time
• How to assign Manifest file in visual studio 2005?
• How to catch Next button click event in Installer ?
• Setup Project Problem