Install Clickonce Application Programmatically Rating: 8,3/10 9240 reviews

There have been a lot of copies of Windows 8 sold since it came out a few months ago, and the Surface Pro was just released. (In fact, I’m writing this on my brand new Surface Pro, which I really like, but that’s a subject for another time.) If you’re using ClickOnce deployment, you’re probably wondering how (or if) it’s going to work with Windows 8.

I’ve worked with Saurabh Bhatia at Microsoft to ensure that this article will cover what you need to know. We use ClickOnce at (whose product is now called Point Across) for our desktop product and VSTO applications, as well as several internal utility applications, so I’ve also tested this on our products to make sure it’s accurate.

May 27, 2014 - It's not always easy to programmatically launch a ClickOnce application. The installation is not particularly transparent, and it's tricky to find. Updating ClickOnce Application Programatically Dave recently mentioned that he's looking for a way to display the published version of a ClickOnce application programatically. By now no doubt he's discovered it, but I thought I'd post it here, along with the code to programatically update an application.

If you are hosting your deployment on a file share or on an intranet, you won’t have to make any changes. You can go get ice cream now while the rest of us soldier on. If you are hosting your deployment on the internet, you will eventually get calls from your customers who have upgraded to Windows 8 or purchased a Windows 8 machine. So let’s talk about that. I’m not going to talk about the bootstrapper right now; that’s going to come up later.

Ginuwine - I'm in Love.mp3 (5.55mb) 10. Download ginuwine apologize rarity. Ginuwine - None of Ur Friends Business.mp3 (6.28mb) 9. Ginuwine - There It Is.mp3 (6.03mb) 8.

For now, let’s concentrate on the ClickOnce application itself. When a user installs a ClickOnce application on Windows 8, here’s what happens:. ClickOnce gets the manifest, checks the certificate, and shows the ClickOnce prompt with “trusted publisher” or “unknown publisher” (depending on your signing certificate). The user clicks the Install button.

It checks the certificate on the executable. If it’s not signed, the Smart Screen Filter is triggered. So here’s what the user experience looks like when you install a ClickOnce application on Windows 8: You get the standard install prompt: The publisher is known because I am signing the deployment with a signing certificate purchased from a Certificate Authority – in this case, Verisign. If you click Install, it shows the standard install dialog and actually installs the application. But then it shows a blue band across your screen saying, “Windows SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.” There is a small “More Info” link under the warning, and a big “OK” button on the bottom of the dialog.

Which one would you click? Which one would your customers click?

Most people will click the OK button. If the user clicks OK, the dialog closes, and nothing else happens.

Now let’s say the user goes to TileWorld (I’m borrowing formerly known as Metro). The user can see the application there in the list of apps because it actually got installed. If he clicks on it to run it, nothing happens. So congratulations!

The user has installed your application, but he can’t run it. What happens if the user clicks “More Info” instead of “OK”? He sees the following screen, and he can choose “Run Anyway” or “Don’t run”. For “Publisher”, it says “Unknown publisher” – this is referring to the executable, which is not specifically signed. Only the manifests are signed. This has never been a requirement for ClickOnce deployments.

If the user chooses “Run Anyway”, it will run the application. And when he goes back to TileWorld and tries to run it from there the next time, it will work and will not prompt him again.

So let’s say he clicks “Run Anyway”, and now he has no problem running your application. What happens when an update is published and he installs it? The smart screen filter interrupts again, and he has to select “More Info” and “Run Anyway” again.

Is there a way to circumvent your ClickOnce application being captured and stopped by the Smart Screen Filter? Otherwise, this would be a much shorter (and depressing) article.

All you have to do is sign the application executable after building it and before deploying it. For this, you need your signing certificate and signtool.exe, which is one of the.NET Framework tools. There are three points in the build/publish process at which you can do this: 1. Post-publish 2. Post-build 3.

Pre-publish #1: Signing the application executable post-publish To do it post-publish, you have to do the following:. a. Publish the files to a local directory. Use signtool to sign the exe for the application. Use mage or mageUI to re-sign the application manifest (.exe.manifest).

Use mage or mageUI to re-sign the deployment manifest (.application). Copy the files to the deployment location. If you’ve already automated your deployment with a script and msbuild, this may be the choice you make. If you publish directly from Visual Studio, the other two options are easier. #2: Signing the application executable post-build To do this, you define a post-build command in your project. Assuming your certificate (pfx file) is in the top level of your project, you can use something like this: 'C: Program Files (x86) Microsoft SDKs Windows v7.0A bin signtool.exe' sign /f '$(ProjectDir)TestWin8COTemporaryKey.pfx' /p nightbird /v '$(ProjectDir)obj x86 $(ConfigurationName) $(TargetFileName)'.

The double quotes are required. “C:Program Files (x86)Microsoft SDKsWindows v7.0A bin signtool.exe” is the path to the signtool application, used to sign the executable. $(ProjectDir) points to the top directory of the project. The subfolder “ obj x86” will vary depending on your build output path.

The above was created and tested on VS2010. On VS2012, my subfolder is just obj.

$(ConfigurationName) is the build configuration name, such as Debug or Release – this is required because it signs it in the obj directory and has to know which folder to use. $(TargetFileName) is the name of the application executable. TestWin8COTemporaryKey.pfx is the name of my certificate file, which is in the top folder of my project.

/p nightbird – this is the password for my temporary certificate I have specified the full path to signtool.exe. I tried to do this with one of the msbuild variables that points to the location of the.NET framework files, but it doesn’t work – it doesn’t translate the variable until after it executes the statement.

If you print it out in the post-build command, it shows the right location in the Visual Studio output window, but gives you an error that it can’t find it when it actually runs this statement. I’m saving you some time here, because I messed around with that for quite a while trying to get it to work, and after asking Saurabh at Microsoft, he couldn’t get it to work without specifying the whole path, either. So if you get it to work with a msbuild variable, let me know how.

After you’ve created your version of the post-build command, you need to put it in the project properties. Double-click on Properties and click on the Build Events tab. Put your command in the Post-build event command line box. Now build the project, and the output window will show the results. If you now publish the application and put the files in the deployment directory, the user can install it and will not see the Smart Screen Filter. What if you have multiple programmers working on the application, and they all build and run the application?

Every programmer must have signtool.exe in the exact same location for this post-build command to work for everybody. If you have a 32-bit machine, the folder for the “Microsoft SDKs” is under “C:Program Files”, without the “(x86)” on the end. And someone might actually install Windows to a drive other than C. If their signtool.exe file is not in the same location, they can’t build and run the application, which means they can’t put in changes and test them. Only the person publishing the application really needs this build command to work. So how do you execute this only for the person publishing the application?

You can set up a pre-publish command. #3: Signing the application executable pre-publish (recommended solution) The pre-publish command is executed after building the application and right before publishing it. There is no box for this under Build Events, so you have to add it to the project yourself. (Be sure to clear out the post-build event command line before doing this.) To add a pre-publish command, right-click on the project in Visual Studio and select “Unload Project”.

Now right-click on the project again and select “Edit yourprojectname.csproj”. It will open the csproj file in Visual Studio so you can edit it.

Go down to the bottom and add a new section before the line. You’re going to put your pre-publish command line in this section. So what do you put in this section? You are going to specify a command to execute, so you have to use Exec Command, and put the command to execute in double quotes. Since you can’t put double-quotes inside of double-quotes (at least, not if you want it to work), you need to change the double-quotes in your command to ' instead. So my build command from above now looks like this: After making this match your parameters, save the csproj file and then close it. Then right-click on the project and reload it: Now if you build your project, you won’t see anything about signing the application executable in the output window.

It will only do it if you publish, and there won’t be logging letting you know it signed it. How do you know if it worked? Go to the folder you published to, and look in the Application Files folder. Locate the application executable in the folder for the new version.

Right-click on it, choose properties. Look for a tab called “Digital Signatures”. If it’s not found, it’s not signed. If you do see it, go to that tab; it will show the signature list and the signer of the certificate. You can double-click on the signer and then view the signing certificate. How will the application work after publishing it with a signed executable?

If you sign your executable and your deployment with a valid certificate from a Certificate Authority like Verisign using one of the methods above, when the user clicks install, it will install without stopping and showing the SmartScreen filter, and updates will do the same. Do I have to use a certificate from a Certificate Authority to circumvent the Smart Screen Filter? Is there any workaround? If you try the old tried and true “install the certificate in the trusted publishers store on the client computer”, you will find that this does not circumvent the Smart Screen Filter. You must have a certificate from a valid Certificate Authority. Without one, your customer will get the Smart Screen filter when he installs the application, and every time he installs an update. What about the bootstrapper (setup.exe)?

The bootstrapper (setup.exe) is signed the same way as the ClickOnce deployment; this happens when you publish. When run, this installs the prerequisites and then calls the ClickOnce application installation. If your certificate is not from a valid CA, the Smart Screen Filter will catch it. This isn’t as critical a problem as the ClickOnce deployment itself because in most cases, your users will only run this the first time. What about VSTO applications? If your VSTO application is deployed via a file share or the intranet zone, you will not be impacted.

If your VSTO application is deployed via the Internet zone, you may be impacted. There is no executable for a VSTO application, just an assembly, so you don’t have to do any extra signing. However, the following is true: If you sign your deployment with a certificate from a CA, everything will work fine, and the Smart Screen filter will not interrupt either the setup.exe or the vsto file from installing the app or keep the app from running. If you are using a test certificate, setup.exe will be caught by the Smart Screen filter. If you click ‘Run Anyway’, it will install the prerequisites, but it will not let you install the VSTO application.

If you install the test certificate in the Trusted Publishers store, setup.exe will still be caught by the Smart Screen filter, but the VSTO application can be installed and run. This is strongly advised against, as installing the certificate on the user’s machine introduces a significant security risk.

Which method to you recommend? The advantage of the post-build command is that it is transparent. You can easily go into the Build properties and see there is a post-build command. A pre-publish command is kind of hidden in the project file.

However, everybody has to have signtool.exe in the same place, and for us that’s a non-starter. Also, if I did leave the post-build command in there, someone might change it to match their path and check in the change, causing a problem when we actually try to build the application for production.

I used the post-build methods to test my build command until I got it to work, and then ported it to a pre-publish command. To summarize, a flowchart: In summary, here’s a flowchart to help you easily see whether your users will get the Smart Screen filter when they install your application on Windows 8. One last note: The first version of VS2012 had a bug where the bootstrapper created when publishing a ClickOnce application would not work on a Windows XP machine. This problem was fixed in the first update. edit: Fixed build paths, some ’s were missing.

Added recommendation. –Robin 2.26.2013 edit: After publishing this article, I heard from a couple of people who were still having problems. Please check out if you are still having problems with the Smart Screen filter, or getting the dreaded “exe has a different computed hash than the manifest” error. –Robin 4.14.2013 Tags: Posted in,.

A while back, I wrote an article that shows you. The article assumed that you already had a Windows Azure account. Since prequels are so popular in Hollywood (Star Wars I-III, anyone?), I thought I would write a prequel to explain how much it costs to host your deployment in Azure, and how to sign up for an Azure account and create the storage account. Hopefully, this article will be more popular than. Show me the money How much does it cost to host your ClickOnce deployment in Windows Azure Storage? Well, for a pay-as-you-go account, here are the costs as of today, which I found by going to and clicking on “Pay-As-You-Go”. Windows Azure Storage.

$0.15 per GB stored per month. $0.01 per 10,000 storage transactions Data Transfers. North America and Europe regions. $0.15 per GB out. Asia Pacific Region. $0.20 per GB out.

All inbound data transfers are at no charge. Let’s take an example. Let’s say we have a deployment consisting of 150 files and a total size of 30MB.

We have 100 customers, and we are going to publish a new version every month, starting in January, and all 100 customers are going to update to every version. At the end of the year, how much will this have cost us? Put your mathlete hats on and get out your calculators. Here we go The storage cost for one month = $0.15 / GB. 30MB. 1GB/1000MB = $.0045.

So January will be (1.value), February will be (2.value) because we’ll have two versions. March will be (3.value), and so on until December when it hits (12.value) because we have 12 versions stored. After calculating that out for the whole year, the total cost of storing the deployment files for the year will cost $0.2475. This is affordable for most people. Let’s talk about the storage transactions. If you have a file bigger than 32MB, it is one transaction per 4MB and one at the end of the list of blocks. If the file is smaller than 32MB, it’s 1 transaction for that file.

All of the files in our case are less than 32MB. So when we upload a new version of the deployment, here are the costs: Storage Transaction cost when uploading once = 30 files. $.01/10000 = $0.00003.

Data Transfer costs are free going up, so nothing to calculate there. How about coming back down to your customer? Transaction cost when downloading once = 30 files. $.01/10000 = $0.00003. Data transfer cost when downloading once = 30 MB. 1GB/1000MB.

$0.15/GB = $0.0045 Now you’re wishing you’d paid attention in all of those math classes, aren’t you? And we’re not done yet. Let’s calculate our total for the entire year. $0.00036 = Storage Transaction cost for uploading 12 versions throughout the year. $0.00 = Data Transfer cost for uploading 12 versions. $0.2475 = Storage for 12 versions uploaded once per month and retained throughout the year. $0.036 = Storage Transaction cost for downloading 12 versions for 100 customers.

$5.40 = Data Transfer cost when downloading 12 versions for 100 customers. So our grand total is $5.68386, which is an average of 47 cents per month. For more detailed information on Windows Azure storage costs, check out from the Windows Azure Storage Team; it was written before they eliminated the Data Transfer cost of uploading to blob storage so don’t include that cost. Thanks to for clarification, and for providing the link to the Windows Azure Storage Team blog. Hook me up with an Azure account You have three basic options.

If you have an MSDN subscription either through your company or because you are a customer, you probably get an MSDN benefit that more than covers your ClickOnce deployment costs. The basic mechanism for signing up will be similar, but the way you set up your storage account will be the same, so that information below should work for you as well as for those who have no MSDN account. You will have to give your credit card to cover any charges over the free usage benefit. If you want to try this out for free without giving your credit card, you can sign up for a. At the end of 30 days, you will have to delete the storage account and set it up on a real account if you want to continue using it. (If you use the same storage account name on the new account, the URL will be the same and your users will be able to pick up updates even though you changed accounts.). If you sign up for a pay-as-you-go account, you have to give your credit card, but you get a free benefit which would make my deployment example free for the first 3 months.

Then at the end of 3 months, it will start charging your credit card, and you will not have to move your storage account. Let’s take a look at how to sign up for this type of account. Go to This should take you to the Windows Azure Platform Offers shown in Figure 1. Figure 1: Windows Azure Platform Offers Click on the Pay-As-You-Go tab and then click the Buy button on the right. Next, you will be given a choice to sign up for a new Windows Live account, or use one you already have (Figure 2). Figure 2: Sign up or sign in. They are going to send you e-mail on this account, so be sure it’s an account you actually check periodically.

After logging in with your Windows Live account, you will be prompted for your profile information (Figure 3). Figure 3: Profile information. Fill in your address and phone number and click the Next button.

You will be prompted for company information (Figure 4). I think you’ll find that a lot of people work for “n/a”. I doubt Microsoft looks at that information, but you can amuse yourself by putting in the name of the most popular fruit in America, just in case someone IS looking at the company names — give them a surprise.

Although, it is widely reported that Apple uses Windows Azure Storage for their new iCloud service, so it might not surprise them at all. (Google would definitely surprise them!) Figure 4: Company information Now they will ask for your Service Usage Address. (You can check the box to use the information you filled in on the profile page.) This is displayed in Figure 5. Figure 5: Service Usage Address. Fill in the information and click Finish.

Next you will get directions to close this page and go to the Services page. You will find yourself at the Customer Portal for the Microsoft Online Services (Figure 6). Figure 6: Customer Portal for Microsoft Online Services Now you get to pick a plan. If you pick the Windows Azure Platform Introductory Special, they provide some benefit for free for the first 90 days. This benefit covers our ClickOnce deployment example above, so it would be free for the first three months, and then would cost you as noted above. If you’re nuts and you don’t like free stuff and just want to pay now, You can select the Windows Azure Platform Consumption.

Click the Buy Now button on your selection; you will be prompted to log in again and then taken to the Pricing and Online Subscription Agreement screen (Figure 7). Figure 7: Pricing and Online Subscription Agreement. Fill in your subscription name. Pick something that you like and can remember.

Then read the Online Subscription agreement as carefully as you read all of these things, check the box and hit the Next button. If you don’t read it carefully, and Microsoft comes to your house to pick up your firstborn child, don’t say I didn’t warn you.

Next comes the hard part. Fill in your credit card information and click the Submit button. If your credit card information is correct, you will be sent to the Azure portal (Figure 8). I now have an Azure account! How do I set up my new storage account? This is the Windows Azure Portal, which you can reach through this URL: Figure 8: Windows Azure Portal This screen is where you manage all of your Azure services.

You can define services, set up databases, and set up storage accounts, which is what we’re here to do. Click on the ‘New Storage Account’ icon at the top of the screen as shown in Figure 9. Figure 9:Create a new storage account Next you will be prompted for your new storage account name (Figure 10). This will be used in the URLs for accessing your deployment, so you should probably think twice before making it something like “myapplicationsux” or “mypornpix”. The name must have only lowercase letters and numbers. After you fill it in, it will tell you if it’s already used. If it doesn’t give you any errors, it’s available.

In regards to the region, you will be asked to either choose a region, choose an affinity group, or create a new affinity group. This is not something you can change later, so choose wisely. (Unlike Walter Donovan in, if you choose poorly, you will not instantly grow ancient and disintegrate.) Figure 10: Create a new storage account An affinity group is basically specifying a location and naming it.

You can then choose the affinity group when setting up other services to ensure that your compute instances and your data are in the same region, which will make them as performant as possible. Just in case you ever want to use this account for something other than Blob Storage, I recommend setting up an affinity group. Select the radio button for “Create or choose an affinity group”, and then select the dropdown.

Then you can select the location – be sure to use the dropdown. Mine defaulted to “anywhere in the US”, but it’s better to select a specific region, such as North Central or South Central, or whatever region is closest to you. Then click OK to go ahead and create the storage account. You should now see your storage account in the Windows Azure Portal (Figure 11). Figure 11: Storage Account You can assign a custom DNS entry to your storage account by clicking the Add Domain button on the top of the screen and following the instructions. The URL for accessing your blob storage is on the right side of the screen.

Mine is robindotnet.blob.core.windows.net. On the right are also the View buttons for retrieving the primary access key that you will need to set up a client application to access your blob storage. With these two pieces of information, you should be able to view your data. For uploading and maintaining your files in blob storage, I use which is excellent, but not free.

Program diploma eksekutif uitm perlis. P rogram Pengajian Profesional Diploma Eksekutif UITM direka khusus untuk memenuhi keperluan pekerja di Malaysia. Setiap Program akan mencabar peserta untuk berfikir dan mencari jalan dalam me mpertingkatkan pengurusan. Program ini bertujuan untuk memperkukuhkan kebolehan kepimpinan dan pengurusan individu dan organisasi.

There are free storage explorers available, such as the and the. You should be good to go. Now go read the article on how to actually, and start racking up those pennies. Tags:, Posted in,.

Now that Microsoft Azure is becoming more widely used, I’m going to do some blogging about it, since I’ve had an opportunity to work with it quite a bit. What better place to start than to do a crossover blog entry on both ClickOnce deployment and Microsoft Azure? So I’m going to show you how to host your ClickOnce deployment in your Azure Blob Storage. To do this, you need an application that you can use to manage blob storage.

I use the in my example. A free application recommended by is the from codeplex. Here is a video that explains this process in detail, complete with screenshots.

There is a summary below. To summarize: Create a container in blob storage for your ClickOnce deployment.

You’ll need the container name when setting your url. I selected ‘clickoncetest’. The only characters allowed are lower case letter, numbers, and the hyphen (-). In your project properties, set your Publishing Folder Location to somewhere on your local drive. Set the Installation Folder URL to the URL that will point to the container in blob storage that is going to host your deployment.

For example, I set the first one to E: Test clickoncetest. My account is goldmailrobin, so my installation URL will be Publish your application.

Then go to the local folder and copy the files and folders up to the container in blob storage. When you are finished, in the root of that container you should have the deployment manifest (yourapp.application file) and the bootstrapper (setup.exe) (and publish.htm if you included it).

You should also have a folder called “Application Files”. In “Application Files”, you should see the ‘versioned folders’ that contain the assemblies for each version of your application that you have published. When doing updates, you need to upload the versioned folder for the new update, and replace the files in the root folder (yourapp.application, setup.exe, and publish.htm). If you have any problems, you can check the MIME types on the published files and make sure they are right. These can be changed for each file if needed. With ClickOnce deployments, you should definitely be using the option that appends.deploy to all of your assemblies, so you should not have any files with unknown extensions. If you want to double-check, the MIME types for a ClickOnce deployment are explained.

Remember that with Blob Storage, it is not going to be storing the files that is going to be the biggest cost factor, it is going to be the transfer of the files to and from the client. Tags:, Posted in,. You can use ClickOnce deployment to install Office Add-ins for Office 2007 and Office 2010. It is very similar to deploying a desktop application, but not identical. With all types of ClickOnce deployments, you may include resources that you need to access programmatically. Files with a file extension of.xml,.mdf, and.mdb are assumed to be data and are deployed by default to the ApplicationDeployment.CurrentDeployment.DataDirectory, but non-data files will be found in the folder with the deployed assemblies. With a non-VSTO application, you can programmatically find the location of the deployment by either accessing System.Windows.Forms.Application.StartupPath or by checking the Location of the executing assembly.

With a VSTO application, the location of the executing assembly does not match the location of the deployment files. The dll for a VSTO add-in is copied from the deployment directory into a separate location, and it is loaded by the host application from there.

I would guess that this happens whenever you run the host application (such as Outlook), and this is why the Office add-in can be uninstalled, reinstalled, updated, etc., without impacting the host application. The changes don’t take effect until the host application is closed and reopened.

So when you retrieve the executing assembly’s location, it points to the dll in the run location, and you can’t use that to track down the deployment files. So how do you find the location of the deployment? You have to examine the CodeBase property of the executing assembly. This comes across as a URI, so you have to retrieve the LocalPath from the URI. It also includes the file name of the main assembly, so you have to retrieve just the directory name specifically. Here’s the code in VB: 'Get the assembly information Dim assemblyInfo As System.Reflection. Assembly = System.Reflection.

Assembly.GetExecutingAssembly 'Location is where the assembly is run from Dim assemblyLocation As String = assemblyInfo.Location 'CodeBase is the location of the ClickOnce deployment files Dim uriCodeBase As Uri = New Uri(assemblyInfo.CodeBase) Dim ClickOnceLocation As String = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString) Here’s the code in C#: //Get the assembly information System.Reflection. Assembly assemblyInfo = System.Reflection. Assembly.GetExecutingAssembly; //Location is where the assembly is run from string assemblyLocation = assemblyInfo.Location; //CodeBase is the location of the ClickOnce deployment files Uri uriCodeBase = new Uri(assemblyInfo.CodeBase); string ClickOnceLocation = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString); When you compare these values for a non-VSTO ClickOnce application, the directories are the same. When I run this code for my Outlook Add-In, I get these values: assemblyLocation = C: Users Robin AppData Local assembly dl3 VBJZ5WH8.6NJ HRZA3JXN.LVG b0520efe 3a5b99ef2e21cb01 GoldMail Outlook Add-In.DLL ClickOnceLocation = C: Users Robin AppData Local Apps 2.0 ZMBZ82EH.TDG WHXVWE4L.GZ7 gold.vsto7a251ffffc5.000010ff9c34a357cc30 If you’ve ever looked at the ClickOnce cache, the ClickOnceLocation will be familiar to you, being in the same format as and location as other types of ClickOnce applications. So the assemblyLocation is where the dll is actually being run from by the hosting application (Outlook in this case), and the ClickOnceLocation is the location of the other deployment files.

Application

Any files that you deploy with your VSTO add-in and want to access programmatically can be found there. Tags: Posted in,. When you are hosting a ClickOnce deployment on a webserver, you need have certain MIME types defined so the server knows how to handle the files. You can host a ClickOnce deployment on any server regardless of the operating system. So you can host a ClickOnce deployment on an Apache server just as easily as a server running Microsoft Windows Server. You just need to set up the right MIME types.

When you install the.NET Framework, it registers the MIME types automatically. This is why you don’t have to set up MIME types if you install IIS on your desktop machine and test your deployments by deploying to localhost. Carrying that forward, if you have the.NET Framework installed on your server, the MIME types should already be registered. This is generally one of the first things to check when you’re having problems downloading the deployment.

A definite sign that your MIME types are not set up correctly is if your customers try to install the application and it shows the XML of the deployment manifest (the.application file) in Internet Explorer rather than installing the application. Here are the basic MIME types you need for every ClickOnce deployment:.application – application/x-ms-application.manifest – application/x-ms-manifest.deploy – application/octet-stream If you are targeting.NET 3.5 or.NET 4.0, you need these as well:.msp – application/octet-stream.msu – application/octet-stream If you are deploying an Office application (VSTO add-in), you need this one:.vsto – application/x-ms-vsto If you are deploying a WPF application, you need these:.xaml – application/xaml+xml.xbap – application/x-ms-xbap Click one of these links to see how to set MIME types in. If your application is hosted on an Apache webserver, you can set up your own MIME types by putting entries in the.htaccess file in the root folder of your deployment.

The syntax for adding the MIME types is this: AddType Mime-type file-extension For example, for the first three MIME types above, you would add these lines to your.htaccess file: AddType application/x-ms-application application AddType application/x-ms-manifest manifest AddType application/octet-stream deploy You can create the.htaccess file simply by opening notepad or some other text editor and adding the lines above to it, and saving it with the file name of.htaccess. Then copy it to the root of your deployment folders, and those MIME types will work for that folder and all of its subfolders. For more information than you ever wanted to know about.htaccess files, check out. Tags: Posted in,. There are some cool new features in.NET 4.0 and VS2010 for ClickOnce deployment. I’m going to summarize the new features here and provide some links to the details. The ClickOnce engine has been updated and strengthened, and the team that supports the runtime says that the errors that seem to have no solution, such as 'dfsvc.exe has stopped working', should be fixed.

They have also added enhanced logging and the option to set the location (and name) of the ClickOnce log file — no more searching through your Temp folder! What’s cool about these changes is that they apply if you install.NET 4.0 on the computer, regardless of the version your application targets.

So if you have a Windows Forms application that targets.NET 2.0 and you are having problems installing it, you can install.NET 4.0 on the computer and turn on the verbose logging. This has already been useful to me, so I will blog about it next. They have fixed “the certificate problem” in all cases. The problem is discussed in detail. The basic problem was that when you changed the certificate used to sign the ClickOnce deployment, the customers would have to uninstall and reinstall the application. They fixed this in.NET 3.5 SP-1 if you used automatic updates, but not for programmatic updates, and not for VSTO projects. Now they have fixed it in all cases when targeting the.NET 4.0 Framework.

With VS2010, you can configure your application to target multiple versions of the.NET Framework. Of course, this doesn’t mean it will run on multiple versions – you will have to verify that yourself. To use this feature, you have to manually edit the manifest files and app.config file and re-sign the manifests. For details, click. For XBAP applications (browser-hosted WPF applications), these can now elevate to Full Trust just like any other ClickOnce application. For more info, check out.

For VSTO projects, you can now with one ClickOnce installation. Like the, it’s all for one and one for all. All of them are installed together, and if you uninstall through Programs, it uninstalls all of them.

For VSTO projects, you also now have the ability to do some post-deployment actions. For example, you can create registry keys, modify a config file,.

Another interesting change for VSTO projects is if you are targeting the.NET 4.0 Framework, you no longer have to include the Primary Interop Assemblies as a prerequisite. The type information for the PIAs that you use in your add-in is embedded into the solution assembly and used at runtime instead of the PIAs.

And last, but not least — in.NET 3.5 SP-1, they quietly introduced the ability to create your own custom UI for your ClickOnce deployment, while still using the ClickOnce engine to install and update your application. They have improved this feature for.NET 4.0; check out the walkthrough example. I think there’s something useful in the new features for everyone. If there are other features you would like to see – other than “install for all users”, which is a complete paradigm shift – please leave a comment.

I will summarize the requests and pass them on to the ClickOnce team at Microsoft. Tags: Posted in,. People frequently ask about the future of ClickOnce deployment. I hear and read things like “Microsoft hasn’t updated their ClickOnce blog since 2006.” “They never change anything in ClickOnce.” “You never hear anything about ClickOnce deployment updates.” “Are they going to keep supporting it?” “Why doesn’t Microsoft use ClickOnce themselves?” The answers to those questions are: 1.

It’s not sexy so nobody talks about it. Yes they do.NET 3.5 included ClickOnce deployment for VSTO applications, which is awesome.

And SP-1 included optional signing and hashing, file associations, and other fun stuff. You do if you know where to listen.

They use it for many of their apps used internally. I don’t think they can use it for.

Can you imagine what the prerequisite list would look like? The release of Silverlight 4 was even noted on one of the Apple News sites. How does “I created this really cool component that you can embed in a WPF application and it cleans your computer screen and tidies up your desk” compare with “I figured out how to install this really cool component on your computer.” See what I mean? Deployment is like delivery. You don’t ever think about how your books get from that cool page on the web to your in two minutes (or, if you’re a traditionalist, to your front porch in two days), but aren’t you excited when they show up?

Even though Microsoft doesn’t go on Oprah to discuss their feelings about ClickOnce deployment, I have discovered over the past few months that they really do care about it. Saurabh Bhatia, the ClickOnce expert at Microsoft, has been helping me over the past year to respond to some of the more difficult questions in the forums. When I attended the MVP Summit in February, I met with Saurabh and some of the other people who work in and around ClickOnce.

The 1-hour meeting stretched into 3-1/2 hours as we discussed feedback and information I had collected from the MSDN Forums, StackOverflow, blog articles, and from individuals who e-mailed me or talked to me after my presentations. I passed on complaints, common problems, and most frequently requested new features. They really wanted to know, and were glad to get the information.

In return, they provided me with a look at what’s coming in.NET 4.0 (that’s the next blog post). Since I’ve returned, they have followed up with answers to my questions.

(They were sending me e-mails with answers before I’d even left Washington!) Saurabh and one of his cohorts, Jason Salameh, continue to provide resources to help me support the ClickOnce Deployment community, and Saurabh set up regular meetings just to touch bases and help me with any difficult issues or questions that come up that I can’t answer. I think of it as a “Stump Saurabh!” session, but so far I’ve only managed to stump him once (proxy authentication). I learn something new with every conversation.

Also coming soon is an update of the Patterns and Practices Smart Client Software Factory and the ClickOnce documentation for it. (I know that because they asked me to do the update to the docs. I was so flattered!) It’s safe to say that Microsoft will continue to support and enhance ClickOnce deployment.

My next blog post will be a summary of the new features available in.NET 4.0. If there are features you want, post a comment and I’ll pass it along. If you have questions about problems you’re having with ClickOnce deployment, please post a question in the I’ll see you there. Tags: Posted in,. In ClickOnce Deployment, it is a common belief that you can not pass arguments to an application unless:. The application is deployed to a web server, and.

The application is online-only. If you are interested in passing query parameters to an online-only application deployed to a web server, check out the. About offline applications, or applications deployed via a file share, that page says this: However, this is no longer the case.

I suspect it was changed when they added the ability to do file associations in.NET 3.5 SP-1. It turns out that you can now pass parameters to:. an offline ClickOnce application,. a ClickOnce application deployed to a file share, and even to. an offline ClickOnce application deployed to a file share.

And of course you can pass parameters to an online-only application using query parameters, but we already knew that (see article referenced above). Here’s how you call the application and pass the arguments. //Get the ActivationArguments from the SetupInformation property of the domain.

String activationData = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData; Here are three different ways to pass and receive arguments:. Pass a file path and name as a URI.

This mimics what happens when you set up a file association and double-click on a file with that extension. The argument will start with “file:”. Pass a query string with key-value pairs in it. This is the same way you pass and parse query strings for an online-only application. The argument will start with a question mark. Pass one value or a list of comma-delimited values. Locate the shortcut for the application.

The first thing you need to do is locate the shortcut in the start menu for the application you want to run — this is made up of the Publisher Name and Product Name. Here is how to find the location of the application’s shortcut. Process.Start(shortcutPath, argsToPass); The argument string that you pass can not have spaces or double-quotes in it. If you pass a b c, you will only get a on the receiving side. If you pass “a”,”b”,”c”, you will get a.

If you need to pass arguments with spaces, pass your arguments as a query string. How to create the argument string to be passed, and how to parse it on the receiving side. Case 1: Sending file path and name. This mimics what happens when you use the ClickOnce properties to set up a file association, and the user double-clicks on an associated file. Build the argument string. Search:. Pages.

Archives. Categories.

Blogroll. RT @: 'The FBI does not do investigations like this.' The Federal Bureau of INVESTIGATION 'does not do INVESTIGATIONS like this tweeted.

Did.something. to my left shoulder.

Hurts like a big dog, and can't raise my arm much higher than my waist w/o sev tweeted. RT @: Hello, female high school student here. I would just like to say that the emergence of this whole 'teenage boys should g tweeted. RT @: Why, because you want to force Dem. Senators in red States into a tough vote. This is pure politics.

Tweeted. RT @: The Wildest Conservative Reactions To Kavanaugh Sexual Assault Allegations via @ tweeted.

There have been a lot of copies of Windows 8 sold since it came out a few months ago, and the Surface Pro was just released. (In fact, I’m writing this on my brand new Surface Pro, which I really like, but that’s a subject for another time.) If you’re using ClickOnce deployment, you’re probably wondering how (or if) it’s going to work with Windows 8.

I’ve worked with Saurabh Bhatia at Microsoft to ensure that this article will cover what you need to know. We use ClickOnce at (whose product is now called Point Across) for our desktop product and VSTO applications, as well as several internal utility applications, so I’ve also tested this on our products to make sure it’s accurate.

May 27, 2014 - It's not always easy to programmatically launch a ClickOnce application. The installation is not particularly transparent, and it's tricky to find. Updating ClickOnce Application Programatically Dave recently mentioned that he's looking for a way to display the published version of a ClickOnce application programatically. By now no doubt he's discovered it, but I thought I'd post it here, along with the code to programatically update an application.

If you are hosting your deployment on a file share or on an intranet, you won’t have to make any changes. You can go get ice cream now while the rest of us soldier on. If you are hosting your deployment on the internet, you will eventually get calls from your customers who have upgraded to Windows 8 or purchased a Windows 8 machine. So let’s talk about that. I’m not going to talk about the bootstrapper right now; that’s going to come up later.

Ginuwine - I'm in Love.mp3 (5.55mb) 10. Download ginuwine apologize rarity. Ginuwine - None of Ur Friends Business.mp3 (6.28mb) 9. Ginuwine - There It Is.mp3 (6.03mb) 8.

For now, let’s concentrate on the ClickOnce application itself. When a user installs a ClickOnce application on Windows 8, here’s what happens:. ClickOnce gets the manifest, checks the certificate, and shows the ClickOnce prompt with “trusted publisher” or “unknown publisher” (depending on your signing certificate). The user clicks the Install button.

It checks the certificate on the executable. If it’s not signed, the Smart Screen Filter is triggered. So here’s what the user experience looks like when you install a ClickOnce application on Windows 8: You get the standard install prompt: The publisher is known because I am signing the deployment with a signing certificate purchased from a Certificate Authority – in this case, Verisign. If you click Install, it shows the standard install dialog and actually installs the application. But then it shows a blue band across your screen saying, “Windows SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.” There is a small “More Info” link under the warning, and a big “OK” button on the bottom of the dialog.

Which one would you click? Which one would your customers click?

Most people will click the OK button. If the user clicks OK, the dialog closes, and nothing else happens.

Now let’s say the user goes to TileWorld (I’m borrowing formerly known as Metro). The user can see the application there in the list of apps because it actually got installed. If he clicks on it to run it, nothing happens. So congratulations!

The user has installed your application, but he can’t run it. What happens if the user clicks “More Info” instead of “OK”? He sees the following screen, and he can choose “Run Anyway” or “Don’t run”. For “Publisher”, it says “Unknown publisher” – this is referring to the executable, which is not specifically signed. Only the manifests are signed. This has never been a requirement for ClickOnce deployments.

If the user chooses “Run Anyway”, it will run the application. And when he goes back to TileWorld and tries to run it from there the next time, it will work and will not prompt him again.

So let’s say he clicks “Run Anyway”, and now he has no problem running your application. What happens when an update is published and he installs it? The smart screen filter interrupts again, and he has to select “More Info” and “Run Anyway” again.

Is there a way to circumvent your ClickOnce application being captured and stopped by the Smart Screen Filter? Otherwise, this would be a much shorter (and depressing) article.

All you have to do is sign the application executable after building it and before deploying it. For this, you need your signing certificate and signtool.exe, which is one of the.NET Framework tools. There are three points in the build/publish process at which you can do this: 1. Post-publish 2. Post-build 3.

Pre-publish #1: Signing the application executable post-publish To do it post-publish, you have to do the following:. a. Publish the files to a local directory. Use signtool to sign the exe for the application. Use mage or mageUI to re-sign the application manifest (.exe.manifest).

Use mage or mageUI to re-sign the deployment manifest (.application). Copy the files to the deployment location. If you’ve already automated your deployment with a script and msbuild, this may be the choice you make. If you publish directly from Visual Studio, the other two options are easier. #2: Signing the application executable post-build To do this, you define a post-build command in your project. Assuming your certificate (pfx file) is in the top level of your project, you can use something like this: 'C: Program Files (x86) Microsoft SDKs Windows v7.0A bin signtool.exe' sign /f '$(ProjectDir)TestWin8COTemporaryKey.pfx' /p nightbird /v '$(ProjectDir)obj x86 $(ConfigurationName) $(TargetFileName)'.

The double quotes are required. “C:Program Files (x86)Microsoft SDKsWindows v7.0A bin signtool.exe” is the path to the signtool application, used to sign the executable. $(ProjectDir) points to the top directory of the project. The subfolder “ obj x86” will vary depending on your build output path.

The above was created and tested on VS2010. On VS2012, my subfolder is just obj.

$(ConfigurationName) is the build configuration name, such as Debug or Release – this is required because it signs it in the obj directory and has to know which folder to use. $(TargetFileName) is the name of the application executable. TestWin8COTemporaryKey.pfx is the name of my certificate file, which is in the top folder of my project.

/p nightbird – this is the password for my temporary certificate I have specified the full path to signtool.exe. I tried to do this with one of the msbuild variables that points to the location of the.NET framework files, but it doesn’t work – it doesn’t translate the variable until after it executes the statement.

If you print it out in the post-build command, it shows the right location in the Visual Studio output window, but gives you an error that it can’t find it when it actually runs this statement. I’m saving you some time here, because I messed around with that for quite a while trying to get it to work, and after asking Saurabh at Microsoft, he couldn’t get it to work without specifying the whole path, either. So if you get it to work with a msbuild variable, let me know how.

After you’ve created your version of the post-build command, you need to put it in the project properties. Double-click on Properties and click on the Build Events tab. Put your command in the Post-build event command line box. Now build the project, and the output window will show the results. If you now publish the application and put the files in the deployment directory, the user can install it and will not see the Smart Screen Filter. What if you have multiple programmers working on the application, and they all build and run the application?

Every programmer must have signtool.exe in the exact same location for this post-build command to work for everybody. If you have a 32-bit machine, the folder for the “Microsoft SDKs” is under “C:Program Files”, without the “(x86)” on the end. And someone might actually install Windows to a drive other than C. If their signtool.exe file is not in the same location, they can’t build and run the application, which means they can’t put in changes and test them. Only the person publishing the application really needs this build command to work. So how do you execute this only for the person publishing the application?

You can set up a pre-publish command. #3: Signing the application executable pre-publish (recommended solution) The pre-publish command is executed after building the application and right before publishing it. There is no box for this under Build Events, so you have to add it to the project yourself. (Be sure to clear out the post-build event command line before doing this.) To add a pre-publish command, right-click on the project in Visual Studio and select “Unload Project”.

Now right-click on the project again and select “Edit yourprojectname.csproj”. It will open the csproj file in Visual Studio so you can edit it.

Go down to the bottom and add a new section before the line. You’re going to put your pre-publish command line in this section. So what do you put in this section? You are going to specify a command to execute, so you have to use Exec Command, and put the command to execute in double quotes. Since you can’t put double-quotes inside of double-quotes (at least, not if you want it to work), you need to change the double-quotes in your command to ' instead. So my build command from above now looks like this: After making this match your parameters, save the csproj file and then close it. Then right-click on the project and reload it: Now if you build your project, you won’t see anything about signing the application executable in the output window.

It will only do it if you publish, and there won’t be logging letting you know it signed it. How do you know if it worked? Go to the folder you published to, and look in the Application Files folder. Locate the application executable in the folder for the new version.

Right-click on it, choose properties. Look for a tab called “Digital Signatures”. If it’s not found, it’s not signed. If you do see it, go to that tab; it will show the signature list and the signer of the certificate. You can double-click on the signer and then view the signing certificate. How will the application work after publishing it with a signed executable?

If you sign your executable and your deployment with a valid certificate from a Certificate Authority like Verisign using one of the methods above, when the user clicks install, it will install without stopping and showing the SmartScreen filter, and updates will do the same. Do I have to use a certificate from a Certificate Authority to circumvent the Smart Screen Filter? Is there any workaround? If you try the old tried and true “install the certificate in the trusted publishers store on the client computer”, you will find that this does not circumvent the Smart Screen Filter. You must have a certificate from a valid Certificate Authority. Without one, your customer will get the Smart Screen filter when he installs the application, and every time he installs an update. What about the bootstrapper (setup.exe)?

The bootstrapper (setup.exe) is signed the same way as the ClickOnce deployment; this happens when you publish. When run, this installs the prerequisites and then calls the ClickOnce application installation. If your certificate is not from a valid CA, the Smart Screen Filter will catch it. This isn’t as critical a problem as the ClickOnce deployment itself because in most cases, your users will only run this the first time. What about VSTO applications? If your VSTO application is deployed via a file share or the intranet zone, you will not be impacted.

If your VSTO application is deployed via the Internet zone, you may be impacted. There is no executable for a VSTO application, just an assembly, so you don’t have to do any extra signing. However, the following is true: If you sign your deployment with a certificate from a CA, everything will work fine, and the Smart Screen filter will not interrupt either the setup.exe or the vsto file from installing the app or keep the app from running. If you are using a test certificate, setup.exe will be caught by the Smart Screen filter. If you click ‘Run Anyway’, it will install the prerequisites, but it will not let you install the VSTO application.

If you install the test certificate in the Trusted Publishers store, setup.exe will still be caught by the Smart Screen filter, but the VSTO application can be installed and run. This is strongly advised against, as installing the certificate on the user’s machine introduces a significant security risk.

Which method to you recommend? The advantage of the post-build command is that it is transparent. You can easily go into the Build properties and see there is a post-build command. A pre-publish command is kind of hidden in the project file.

However, everybody has to have signtool.exe in the same place, and for us that’s a non-starter. Also, if I did leave the post-build command in there, someone might change it to match their path and check in the change, causing a problem when we actually try to build the application for production.

I used the post-build methods to test my build command until I got it to work, and then ported it to a pre-publish command. To summarize, a flowchart: In summary, here’s a flowchart to help you easily see whether your users will get the Smart Screen filter when they install your application on Windows 8. One last note: The first version of VS2012 had a bug where the bootstrapper created when publishing a ClickOnce application would not work on a Windows XP machine. This problem was fixed in the first update. edit: Fixed build paths, some ’s were missing.

Added recommendation. –Robin 2.26.2013 edit: After publishing this article, I heard from a couple of people who were still having problems. Please check out if you are still having problems with the Smart Screen filter, or getting the dreaded “exe has a different computed hash than the manifest” error. –Robin 4.14.2013 Tags: Posted in,.

A while back, I wrote an article that shows you. The article assumed that you already had a Windows Azure account. Since prequels are so popular in Hollywood (Star Wars I-III, anyone?), I thought I would write a prequel to explain how much it costs to host your deployment in Azure, and how to sign up for an Azure account and create the storage account. Hopefully, this article will be more popular than. Show me the money How much does it cost to host your ClickOnce deployment in Windows Azure Storage? Well, for a pay-as-you-go account, here are the costs as of today, which I found by going to and clicking on “Pay-As-You-Go”. Windows Azure Storage.

$0.15 per GB stored per month. $0.01 per 10,000 storage transactions Data Transfers. North America and Europe regions. $0.15 per GB out. Asia Pacific Region. $0.20 per GB out.

All inbound data transfers are at no charge. Let’s take an example. Let’s say we have a deployment consisting of 150 files and a total size of 30MB.

We have 100 customers, and we are going to publish a new version every month, starting in January, and all 100 customers are going to update to every version. At the end of the year, how much will this have cost us? Put your mathlete hats on and get out your calculators. Here we go The storage cost for one month = $0.15 / GB. 30MB. 1GB/1000MB = $.0045.

So January will be (1.value), February will be (2.value) because we’ll have two versions. March will be (3.value), and so on until December when it hits (12.value) because we have 12 versions stored. After calculating that out for the whole year, the total cost of storing the deployment files for the year will cost $0.2475. This is affordable for most people. Let’s talk about the storage transactions. If you have a file bigger than 32MB, it is one transaction per 4MB and one at the end of the list of blocks. If the file is smaller than 32MB, it’s 1 transaction for that file.

All of the files in our case are less than 32MB. So when we upload a new version of the deployment, here are the costs: Storage Transaction cost when uploading once = 30 files. $.01/10000 = $0.00003.

Data Transfer costs are free going up, so nothing to calculate there. How about coming back down to your customer? Transaction cost when downloading once = 30 files. $.01/10000 = $0.00003. Data transfer cost when downloading once = 30 MB. 1GB/1000MB.

$0.15/GB = $0.0045 Now you’re wishing you’d paid attention in all of those math classes, aren’t you? And we’re not done yet. Let’s calculate our total for the entire year. $0.00036 = Storage Transaction cost for uploading 12 versions throughout the year. $0.00 = Data Transfer cost for uploading 12 versions. $0.2475 = Storage for 12 versions uploaded once per month and retained throughout the year. $0.036 = Storage Transaction cost for downloading 12 versions for 100 customers.

$5.40 = Data Transfer cost when downloading 12 versions for 100 customers. So our grand total is $5.68386, which is an average of 47 cents per month. For more detailed information on Windows Azure storage costs, check out from the Windows Azure Storage Team; it was written before they eliminated the Data Transfer cost of uploading to blob storage so don’t include that cost. Thanks to for clarification, and for providing the link to the Windows Azure Storage Team blog. Hook me up with an Azure account You have three basic options.

If you have an MSDN subscription either through your company or because you are a customer, you probably get an MSDN benefit that more than covers your ClickOnce deployment costs. The basic mechanism for signing up will be similar, but the way you set up your storage account will be the same, so that information below should work for you as well as for those who have no MSDN account. You will have to give your credit card to cover any charges over the free usage benefit. If you want to try this out for free without giving your credit card, you can sign up for a. At the end of 30 days, you will have to delete the storage account and set it up on a real account if you want to continue using it. (If you use the same storage account name on the new account, the URL will be the same and your users will be able to pick up updates even though you changed accounts.). If you sign up for a pay-as-you-go account, you have to give your credit card, but you get a free benefit which would make my deployment example free for the first 3 months.

Then at the end of 3 months, it will start charging your credit card, and you will not have to move your storage account. Let’s take a look at how to sign up for this type of account. Go to This should take you to the Windows Azure Platform Offers shown in Figure 1. Figure 1: Windows Azure Platform Offers Click on the Pay-As-You-Go tab and then click the Buy button on the right. Next, you will be given a choice to sign up for a new Windows Live account, or use one you already have (Figure 2). Figure 2: Sign up or sign in. They are going to send you e-mail on this account, so be sure it’s an account you actually check periodically.

After logging in with your Windows Live account, you will be prompted for your profile information (Figure 3). Figure 3: Profile information. Fill in your address and phone number and click the Next button.

You will be prompted for company information (Figure 4). I think you’ll find that a lot of people work for “n/a”. I doubt Microsoft looks at that information, but you can amuse yourself by putting in the name of the most popular fruit in America, just in case someone IS looking at the company names — give them a surprise.

Although, it is widely reported that Apple uses Windows Azure Storage for their new iCloud service, so it might not surprise them at all. (Google would definitely surprise them!) Figure 4: Company information Now they will ask for your Service Usage Address. (You can check the box to use the information you filled in on the profile page.) This is displayed in Figure 5. Figure 5: Service Usage Address. Fill in the information and click Finish.

Next you will get directions to close this page and go to the Services page. You will find yourself at the Customer Portal for the Microsoft Online Services (Figure 6). Figure 6: Customer Portal for Microsoft Online Services Now you get to pick a plan. If you pick the Windows Azure Platform Introductory Special, they provide some benefit for free for the first 90 days. This benefit covers our ClickOnce deployment example above, so it would be free for the first three months, and then would cost you as noted above. If you’re nuts and you don’t like free stuff and just want to pay now, You can select the Windows Azure Platform Consumption.

Click the Buy Now button on your selection; you will be prompted to log in again and then taken to the Pricing and Online Subscription Agreement screen (Figure 7). Figure 7: Pricing and Online Subscription Agreement. Fill in your subscription name. Pick something that you like and can remember.

Then read the Online Subscription agreement as carefully as you read all of these things, check the box and hit the Next button. If you don’t read it carefully, and Microsoft comes to your house to pick up your firstborn child, don’t say I didn’t warn you.

Next comes the hard part. Fill in your credit card information and click the Submit button. If your credit card information is correct, you will be sent to the Azure portal (Figure 8). I now have an Azure account! How do I set up my new storage account? This is the Windows Azure Portal, which you can reach through this URL: Figure 8: Windows Azure Portal This screen is where you manage all of your Azure services.

You can define services, set up databases, and set up storage accounts, which is what we’re here to do. Click on the ‘New Storage Account’ icon at the top of the screen as shown in Figure 9. Figure 9:Create a new storage account Next you will be prompted for your new storage account name (Figure 10). This will be used in the URLs for accessing your deployment, so you should probably think twice before making it something like “myapplicationsux” or “mypornpix”. The name must have only lowercase letters and numbers. After you fill it in, it will tell you if it’s already used. If it doesn’t give you any errors, it’s available.

In regards to the region, you will be asked to either choose a region, choose an affinity group, or create a new affinity group. This is not something you can change later, so choose wisely. (Unlike Walter Donovan in, if you choose poorly, you will not instantly grow ancient and disintegrate.) Figure 10: Create a new storage account An affinity group is basically specifying a location and naming it.

You can then choose the affinity group when setting up other services to ensure that your compute instances and your data are in the same region, which will make them as performant as possible. Just in case you ever want to use this account for something other than Blob Storage, I recommend setting up an affinity group. Select the radio button for “Create or choose an affinity group”, and then select the dropdown.

Then you can select the location – be sure to use the dropdown. Mine defaulted to “anywhere in the US”, but it’s better to select a specific region, such as North Central or South Central, or whatever region is closest to you. Then click OK to go ahead and create the storage account. You should now see your storage account in the Windows Azure Portal (Figure 11). Figure 11: Storage Account You can assign a custom DNS entry to your storage account by clicking the Add Domain button on the top of the screen and following the instructions. The URL for accessing your blob storage is on the right side of the screen.

Mine is robindotnet.blob.core.windows.net. On the right are also the View buttons for retrieving the primary access key that you will need to set up a client application to access your blob storage. With these two pieces of information, you should be able to view your data. For uploading and maintaining your files in blob storage, I use which is excellent, but not free.

Program diploma eksekutif uitm perlis. P rogram Pengajian Profesional Diploma Eksekutif UITM direka khusus untuk memenuhi keperluan pekerja di Malaysia. Setiap Program akan mencabar peserta untuk berfikir dan mencari jalan dalam me mpertingkatkan pengurusan. Program ini bertujuan untuk memperkukuhkan kebolehan kepimpinan dan pengurusan individu dan organisasi.

There are free storage explorers available, such as the and the. You should be good to go. Now go read the article on how to actually, and start racking up those pennies. Tags:, Posted in,.

Now that Microsoft Azure is becoming more widely used, I’m going to do some blogging about it, since I’ve had an opportunity to work with it quite a bit. What better place to start than to do a crossover blog entry on both ClickOnce deployment and Microsoft Azure? So I’m going to show you how to host your ClickOnce deployment in your Azure Blob Storage. To do this, you need an application that you can use to manage blob storage.

I use the in my example. A free application recommended by is the from codeplex. Here is a video that explains this process in detail, complete with screenshots.

There is a summary below. To summarize: Create a container in blob storage for your ClickOnce deployment.

You’ll need the container name when setting your url. I selected ‘clickoncetest’. The only characters allowed are lower case letter, numbers, and the hyphen (-). In your project properties, set your Publishing Folder Location to somewhere on your local drive. Set the Installation Folder URL to the URL that will point to the container in blob storage that is going to host your deployment.

For example, I set the first one to E: Test clickoncetest. My account is goldmailrobin, so my installation URL will be Publish your application.

Then go to the local folder and copy the files and folders up to the container in blob storage. When you are finished, in the root of that container you should have the deployment manifest (yourapp.application file) and the bootstrapper (setup.exe) (and publish.htm if you included it).

You should also have a folder called “Application Files”. In “Application Files”, you should see the ‘versioned folders’ that contain the assemblies for each version of your application that you have published. When doing updates, you need to upload the versioned folder for the new update, and replace the files in the root folder (yourapp.application, setup.exe, and publish.htm). If you have any problems, you can check the MIME types on the published files and make sure they are right. These can be changed for each file if needed. With ClickOnce deployments, you should definitely be using the option that appends.deploy to all of your assemblies, so you should not have any files with unknown extensions. If you want to double-check, the MIME types for a ClickOnce deployment are explained.

Remember that with Blob Storage, it is not going to be storing the files that is going to be the biggest cost factor, it is going to be the transfer of the files to and from the client. Tags:, Posted in,. You can use ClickOnce deployment to install Office Add-ins for Office 2007 and Office 2010. It is very similar to deploying a desktop application, but not identical. With all types of ClickOnce deployments, you may include resources that you need to access programmatically. Files with a file extension of.xml,.mdf, and.mdb are assumed to be data and are deployed by default to the ApplicationDeployment.CurrentDeployment.DataDirectory, but non-data files will be found in the folder with the deployed assemblies. With a non-VSTO application, you can programmatically find the location of the deployment by either accessing System.Windows.Forms.Application.StartupPath or by checking the Location of the executing assembly.

With a VSTO application, the location of the executing assembly does not match the location of the deployment files. The dll for a VSTO add-in is copied from the deployment directory into a separate location, and it is loaded by the host application from there.

I would guess that this happens whenever you run the host application (such as Outlook), and this is why the Office add-in can be uninstalled, reinstalled, updated, etc., without impacting the host application. The changes don’t take effect until the host application is closed and reopened.

So when you retrieve the executing assembly’s location, it points to the dll in the run location, and you can’t use that to track down the deployment files. So how do you find the location of the deployment? You have to examine the CodeBase property of the executing assembly. This comes across as a URI, so you have to retrieve the LocalPath from the URI. It also includes the file name of the main assembly, so you have to retrieve just the directory name specifically. Here’s the code in VB: 'Get the assembly information Dim assemblyInfo As System.Reflection. Assembly = System.Reflection.

Assembly.GetExecutingAssembly 'Location is where the assembly is run from Dim assemblyLocation As String = assemblyInfo.Location 'CodeBase is the location of the ClickOnce deployment files Dim uriCodeBase As Uri = New Uri(assemblyInfo.CodeBase) Dim ClickOnceLocation As String = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString) Here’s the code in C#: //Get the assembly information System.Reflection. Assembly assemblyInfo = System.Reflection. Assembly.GetExecutingAssembly; //Location is where the assembly is run from string assemblyLocation = assemblyInfo.Location; //CodeBase is the location of the ClickOnce deployment files Uri uriCodeBase = new Uri(assemblyInfo.CodeBase); string ClickOnceLocation = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString); When you compare these values for a non-VSTO ClickOnce application, the directories are the same. When I run this code for my Outlook Add-In, I get these values: assemblyLocation = C: Users Robin AppData Local assembly dl3 VBJZ5WH8.6NJ HRZA3JXN.LVG b0520efe 3a5b99ef2e21cb01 GoldMail Outlook Add-In.DLL ClickOnceLocation = C: Users Robin AppData Local Apps 2.0 ZMBZ82EH.TDG WHXVWE4L.GZ7 gold.vsto7a251ffffc5.000010ff9c34a357cc30 If you’ve ever looked at the ClickOnce cache, the ClickOnceLocation will be familiar to you, being in the same format as and location as other types of ClickOnce applications. So the assemblyLocation is where the dll is actually being run from by the hosting application (Outlook in this case), and the ClickOnceLocation is the location of the other deployment files.

Application

Any files that you deploy with your VSTO add-in and want to access programmatically can be found there. Tags: Posted in,. When you are hosting a ClickOnce deployment on a webserver, you need have certain MIME types defined so the server knows how to handle the files. You can host a ClickOnce deployment on any server regardless of the operating system. So you can host a ClickOnce deployment on an Apache server just as easily as a server running Microsoft Windows Server. You just need to set up the right MIME types.

When you install the.NET Framework, it registers the MIME types automatically. This is why you don’t have to set up MIME types if you install IIS on your desktop machine and test your deployments by deploying to localhost. Carrying that forward, if you have the.NET Framework installed on your server, the MIME types should already be registered. This is generally one of the first things to check when you’re having problems downloading the deployment.

A definite sign that your MIME types are not set up correctly is if your customers try to install the application and it shows the XML of the deployment manifest (the.application file) in Internet Explorer rather than installing the application. Here are the basic MIME types you need for every ClickOnce deployment:.application – application/x-ms-application.manifest – application/x-ms-manifest.deploy – application/octet-stream If you are targeting.NET 3.5 or.NET 4.0, you need these as well:.msp – application/octet-stream.msu – application/octet-stream If you are deploying an Office application (VSTO add-in), you need this one:.vsto – application/x-ms-vsto If you are deploying a WPF application, you need these:.xaml – application/xaml+xml.xbap – application/x-ms-xbap Click one of these links to see how to set MIME types in. If your application is hosted on an Apache webserver, you can set up your own MIME types by putting entries in the.htaccess file in the root folder of your deployment.

The syntax for adding the MIME types is this: AddType Mime-type file-extension For example, for the first three MIME types above, you would add these lines to your.htaccess file: AddType application/x-ms-application application AddType application/x-ms-manifest manifest AddType application/octet-stream deploy You can create the.htaccess file simply by opening notepad or some other text editor and adding the lines above to it, and saving it with the file name of.htaccess. Then copy it to the root of your deployment folders, and those MIME types will work for that folder and all of its subfolders. For more information than you ever wanted to know about.htaccess files, check out. Tags: Posted in,. There are some cool new features in.NET 4.0 and VS2010 for ClickOnce deployment. I’m going to summarize the new features here and provide some links to the details. The ClickOnce engine has been updated and strengthened, and the team that supports the runtime says that the errors that seem to have no solution, such as 'dfsvc.exe has stopped working', should be fixed.

They have also added enhanced logging and the option to set the location (and name) of the ClickOnce log file — no more searching through your Temp folder! What’s cool about these changes is that they apply if you install.NET 4.0 on the computer, regardless of the version your application targets.

So if you have a Windows Forms application that targets.NET 2.0 and you are having problems installing it, you can install.NET 4.0 on the computer and turn on the verbose logging. This has already been useful to me, so I will blog about it next. They have fixed “the certificate problem” in all cases. The problem is discussed in detail. The basic problem was that when you changed the certificate used to sign the ClickOnce deployment, the customers would have to uninstall and reinstall the application. They fixed this in.NET 3.5 SP-1 if you used automatic updates, but not for programmatic updates, and not for VSTO projects. Now they have fixed it in all cases when targeting the.NET 4.0 Framework.

With VS2010, you can configure your application to target multiple versions of the.NET Framework. Of course, this doesn’t mean it will run on multiple versions – you will have to verify that yourself. To use this feature, you have to manually edit the manifest files and app.config file and re-sign the manifests. For details, click. For XBAP applications (browser-hosted WPF applications), these can now elevate to Full Trust just like any other ClickOnce application. For more info, check out.

For VSTO projects, you can now with one ClickOnce installation. Like the, it’s all for one and one for all. All of them are installed together, and if you uninstall through Programs, it uninstalls all of them.

For VSTO projects, you also now have the ability to do some post-deployment actions. For example, you can create registry keys, modify a config file,.

Another interesting change for VSTO projects is if you are targeting the.NET 4.0 Framework, you no longer have to include the Primary Interop Assemblies as a prerequisite. The type information for the PIAs that you use in your add-in is embedded into the solution assembly and used at runtime instead of the PIAs.

And last, but not least — in.NET 3.5 SP-1, they quietly introduced the ability to create your own custom UI for your ClickOnce deployment, while still using the ClickOnce engine to install and update your application. They have improved this feature for.NET 4.0; check out the walkthrough example. I think there’s something useful in the new features for everyone. If there are other features you would like to see – other than “install for all users”, which is a complete paradigm shift – please leave a comment.

I will summarize the requests and pass them on to the ClickOnce team at Microsoft. Tags: Posted in,. People frequently ask about the future of ClickOnce deployment. I hear and read things like “Microsoft hasn’t updated their ClickOnce blog since 2006.” “They never change anything in ClickOnce.” “You never hear anything about ClickOnce deployment updates.” “Are they going to keep supporting it?” “Why doesn’t Microsoft use ClickOnce themselves?” The answers to those questions are: 1.

It’s not sexy so nobody talks about it. Yes they do.NET 3.5 included ClickOnce deployment for VSTO applications, which is awesome.

And SP-1 included optional signing and hashing, file associations, and other fun stuff. You do if you know where to listen.

They use it for many of their apps used internally. I don’t think they can use it for.

Can you imagine what the prerequisite list would look like? The release of Silverlight 4 was even noted on one of the Apple News sites. How does “I created this really cool component that you can embed in a WPF application and it cleans your computer screen and tidies up your desk” compare with “I figured out how to install this really cool component on your computer.” See what I mean? Deployment is like delivery. You don’t ever think about how your books get from that cool page on the web to your in two minutes (or, if you’re a traditionalist, to your front porch in two days), but aren’t you excited when they show up?

Even though Microsoft doesn’t go on Oprah to discuss their feelings about ClickOnce deployment, I have discovered over the past few months that they really do care about it. Saurabh Bhatia, the ClickOnce expert at Microsoft, has been helping me over the past year to respond to some of the more difficult questions in the forums. When I attended the MVP Summit in February, I met with Saurabh and some of the other people who work in and around ClickOnce.

The 1-hour meeting stretched into 3-1/2 hours as we discussed feedback and information I had collected from the MSDN Forums, StackOverflow, blog articles, and from individuals who e-mailed me or talked to me after my presentations. I passed on complaints, common problems, and most frequently requested new features. They really wanted to know, and were glad to get the information.

In return, they provided me with a look at what’s coming in.NET 4.0 (that’s the next blog post). Since I’ve returned, they have followed up with answers to my questions.

(They were sending me e-mails with answers before I’d even left Washington!) Saurabh and one of his cohorts, Jason Salameh, continue to provide resources to help me support the ClickOnce Deployment community, and Saurabh set up regular meetings just to touch bases and help me with any difficult issues or questions that come up that I can’t answer. I think of it as a “Stump Saurabh!” session, but so far I’ve only managed to stump him once (proxy authentication). I learn something new with every conversation.

Also coming soon is an update of the Patterns and Practices Smart Client Software Factory and the ClickOnce documentation for it. (I know that because they asked me to do the update to the docs. I was so flattered!) It’s safe to say that Microsoft will continue to support and enhance ClickOnce deployment.

My next blog post will be a summary of the new features available in.NET 4.0. If there are features you want, post a comment and I’ll pass it along. If you have questions about problems you’re having with ClickOnce deployment, please post a question in the I’ll see you there. Tags: Posted in,. In ClickOnce Deployment, it is a common belief that you can not pass arguments to an application unless:. The application is deployed to a web server, and.

The application is online-only. If you are interested in passing query parameters to an online-only application deployed to a web server, check out the. About offline applications, or applications deployed via a file share, that page says this: However, this is no longer the case.

I suspect it was changed when they added the ability to do file associations in.NET 3.5 SP-1. It turns out that you can now pass parameters to:. an offline ClickOnce application,. a ClickOnce application deployed to a file share, and even to. an offline ClickOnce application deployed to a file share.

And of course you can pass parameters to an online-only application using query parameters, but we already knew that (see article referenced above). Here’s how you call the application and pass the arguments. //Get the ActivationArguments from the SetupInformation property of the domain.

String activationData = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData; Here are three different ways to pass and receive arguments:. Pass a file path and name as a URI.

This mimics what happens when you set up a file association and double-click on a file with that extension. The argument will start with “file:”. Pass a query string with key-value pairs in it. This is the same way you pass and parse query strings for an online-only application. The argument will start with a question mark. Pass one value or a list of comma-delimited values. Locate the shortcut for the application.

The first thing you need to do is locate the shortcut in the start menu for the application you want to run — this is made up of the Publisher Name and Product Name. Here is how to find the location of the application’s shortcut. Process.Start(shortcutPath, argsToPass); The argument string that you pass can not have spaces or double-quotes in it. If you pass a b c, you will only get a on the receiving side. If you pass “a”,”b”,”c”, you will get a.

If you need to pass arguments with spaces, pass your arguments as a query string. How to create the argument string to be passed, and how to parse it on the receiving side. Case 1: Sending file path and name. This mimics what happens when you use the ClickOnce properties to set up a file association, and the user double-clicks on an associated file. Build the argument string. Search:. Pages.

Archives. Categories.

Blogroll. RT @: 'The FBI does not do investigations like this.' The Federal Bureau of INVESTIGATION 'does not do INVESTIGATIONS like this tweeted.

Did.something. to my left shoulder.

Hurts like a big dog, and can't raise my arm much higher than my waist w/o sev tweeted. RT @: Hello, female high school student here. I would just like to say that the emergence of this whole 'teenage boys should g tweeted. RT @: Why, because you want to force Dem. Senators in red States into a tough vote. This is pure politics.

Tweeted. RT @: The Wildest Conservative Reactions To Kavanaugh Sexual Assault Allegations via @ tweeted.

...">Install Clickonce Application Programmatically(29.02.2020)
  • Install Clickonce Application Programmatically Rating: 8,3/10 9240 reviews
  • There have been a lot of copies of Windows 8 sold since it came out a few months ago, and the Surface Pro was just released. (In fact, I’m writing this on my brand new Surface Pro, which I really like, but that’s a subject for another time.) If you’re using ClickOnce deployment, you’re probably wondering how (or if) it’s going to work with Windows 8.

    I’ve worked with Saurabh Bhatia at Microsoft to ensure that this article will cover what you need to know. We use ClickOnce at (whose product is now called Point Across) for our desktop product and VSTO applications, as well as several internal utility applications, so I’ve also tested this on our products to make sure it’s accurate.

    May 27, 2014 - It's not always easy to programmatically launch a ClickOnce application. The installation is not particularly transparent, and it's tricky to find. Updating ClickOnce Application Programatically Dave recently mentioned that he's looking for a way to display the published version of a ClickOnce application programatically. By now no doubt he's discovered it, but I thought I'd post it here, along with the code to programatically update an application.

    If you are hosting your deployment on a file share or on an intranet, you won’t have to make any changes. You can go get ice cream now while the rest of us soldier on. If you are hosting your deployment on the internet, you will eventually get calls from your customers who have upgraded to Windows 8 or purchased a Windows 8 machine. So let’s talk about that. I’m not going to talk about the bootstrapper right now; that’s going to come up later.

    Ginuwine - I'm in Love.mp3 (5.55mb) 10. Download ginuwine apologize rarity. Ginuwine - None of Ur Friends Business.mp3 (6.28mb) 9. Ginuwine - There It Is.mp3 (6.03mb) 8.

    For now, let’s concentrate on the ClickOnce application itself. When a user installs a ClickOnce application on Windows 8, here’s what happens:. ClickOnce gets the manifest, checks the certificate, and shows the ClickOnce prompt with “trusted publisher” or “unknown publisher” (depending on your signing certificate). The user clicks the Install button.

    It checks the certificate on the executable. If it’s not signed, the Smart Screen Filter is triggered. So here’s what the user experience looks like when you install a ClickOnce application on Windows 8: You get the standard install prompt: The publisher is known because I am signing the deployment with a signing certificate purchased from a Certificate Authority – in this case, Verisign. If you click Install, it shows the standard install dialog and actually installs the application. But then it shows a blue band across your screen saying, “Windows SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.” There is a small “More Info” link under the warning, and a big “OK” button on the bottom of the dialog.

    Which one would you click? Which one would your customers click?

    Most people will click the OK button. If the user clicks OK, the dialog closes, and nothing else happens.

    Now let’s say the user goes to TileWorld (I’m borrowing formerly known as Metro). The user can see the application there in the list of apps because it actually got installed. If he clicks on it to run it, nothing happens. So congratulations!

    The user has installed your application, but he can’t run it. What happens if the user clicks “More Info” instead of “OK”? He sees the following screen, and he can choose “Run Anyway” or “Don’t run”. For “Publisher”, it says “Unknown publisher” – this is referring to the executable, which is not specifically signed. Only the manifests are signed. This has never been a requirement for ClickOnce deployments.

    If the user chooses “Run Anyway”, it will run the application. And when he goes back to TileWorld and tries to run it from there the next time, it will work and will not prompt him again.

    So let’s say he clicks “Run Anyway”, and now he has no problem running your application. What happens when an update is published and he installs it? The smart screen filter interrupts again, and he has to select “More Info” and “Run Anyway” again.

    Is there a way to circumvent your ClickOnce application being captured and stopped by the Smart Screen Filter? Otherwise, this would be a much shorter (and depressing) article.

    All you have to do is sign the application executable after building it and before deploying it. For this, you need your signing certificate and signtool.exe, which is one of the.NET Framework tools. There are three points in the build/publish process at which you can do this: 1. Post-publish 2. Post-build 3.

    Pre-publish #1: Signing the application executable post-publish To do it post-publish, you have to do the following:. a. Publish the files to a local directory. Use signtool to sign the exe for the application. Use mage or mageUI to re-sign the application manifest (.exe.manifest).

    Use mage or mageUI to re-sign the deployment manifest (.application). Copy the files to the deployment location. If you’ve already automated your deployment with a script and msbuild, this may be the choice you make. If you publish directly from Visual Studio, the other two options are easier. #2: Signing the application executable post-build To do this, you define a post-build command in your project. Assuming your certificate (pfx file) is in the top level of your project, you can use something like this: 'C: Program Files (x86) Microsoft SDKs Windows v7.0A bin signtool.exe' sign /f '$(ProjectDir)TestWin8COTemporaryKey.pfx' /p nightbird /v '$(ProjectDir)obj x86 $(ConfigurationName) $(TargetFileName)'.

    The double quotes are required. “C:Program Files (x86)Microsoft SDKsWindows v7.0A bin signtool.exe” is the path to the signtool application, used to sign the executable. $(ProjectDir) points to the top directory of the project. The subfolder “ obj x86” will vary depending on your build output path.

    The above was created and tested on VS2010. On VS2012, my subfolder is just obj.

    $(ConfigurationName) is the build configuration name, such as Debug or Release – this is required because it signs it in the obj directory and has to know which folder to use. $(TargetFileName) is the name of the application executable. TestWin8COTemporaryKey.pfx is the name of my certificate file, which is in the top folder of my project.

    /p nightbird – this is the password for my temporary certificate I have specified the full path to signtool.exe. I tried to do this with one of the msbuild variables that points to the location of the.NET framework files, but it doesn’t work – it doesn’t translate the variable until after it executes the statement.

    If you print it out in the post-build command, it shows the right location in the Visual Studio output window, but gives you an error that it can’t find it when it actually runs this statement. I’m saving you some time here, because I messed around with that for quite a while trying to get it to work, and after asking Saurabh at Microsoft, he couldn’t get it to work without specifying the whole path, either. So if you get it to work with a msbuild variable, let me know how.

    After you’ve created your version of the post-build command, you need to put it in the project properties. Double-click on Properties and click on the Build Events tab. Put your command in the Post-build event command line box. Now build the project, and the output window will show the results. If you now publish the application and put the files in the deployment directory, the user can install it and will not see the Smart Screen Filter. What if you have multiple programmers working on the application, and they all build and run the application?

    Every programmer must have signtool.exe in the exact same location for this post-build command to work for everybody. If you have a 32-bit machine, the folder for the “Microsoft SDKs” is under “C:Program Files”, without the “(x86)” on the end. And someone might actually install Windows to a drive other than C. If their signtool.exe file is not in the same location, they can’t build and run the application, which means they can’t put in changes and test them. Only the person publishing the application really needs this build command to work. So how do you execute this only for the person publishing the application?

    You can set up a pre-publish command. #3: Signing the application executable pre-publish (recommended solution) The pre-publish command is executed after building the application and right before publishing it. There is no box for this under Build Events, so you have to add it to the project yourself. (Be sure to clear out the post-build event command line before doing this.) To add a pre-publish command, right-click on the project in Visual Studio and select “Unload Project”.

    Now right-click on the project again and select “Edit yourprojectname.csproj”. It will open the csproj file in Visual Studio so you can edit it.

    Go down to the bottom and add a new section before the line. You’re going to put your pre-publish command line in this section. So what do you put in this section? You are going to specify a command to execute, so you have to use Exec Command, and put the command to execute in double quotes. Since you can’t put double-quotes inside of double-quotes (at least, not if you want it to work), you need to change the double-quotes in your command to ' instead. So my build command from above now looks like this: After making this match your parameters, save the csproj file and then close it. Then right-click on the project and reload it: Now if you build your project, you won’t see anything about signing the application executable in the output window.

    It will only do it if you publish, and there won’t be logging letting you know it signed it. How do you know if it worked? Go to the folder you published to, and look in the Application Files folder. Locate the application executable in the folder for the new version.

    Right-click on it, choose properties. Look for a tab called “Digital Signatures”. If it’s not found, it’s not signed. If you do see it, go to that tab; it will show the signature list and the signer of the certificate. You can double-click on the signer and then view the signing certificate. How will the application work after publishing it with a signed executable?

    If you sign your executable and your deployment with a valid certificate from a Certificate Authority like Verisign using one of the methods above, when the user clicks install, it will install without stopping and showing the SmartScreen filter, and updates will do the same. Do I have to use a certificate from a Certificate Authority to circumvent the Smart Screen Filter? Is there any workaround? If you try the old tried and true “install the certificate in the trusted publishers store on the client computer”, you will find that this does not circumvent the Smart Screen Filter. You must have a certificate from a valid Certificate Authority. Without one, your customer will get the Smart Screen filter when he installs the application, and every time he installs an update. What about the bootstrapper (setup.exe)?

    The bootstrapper (setup.exe) is signed the same way as the ClickOnce deployment; this happens when you publish. When run, this installs the prerequisites and then calls the ClickOnce application installation. If your certificate is not from a valid CA, the Smart Screen Filter will catch it. This isn’t as critical a problem as the ClickOnce deployment itself because in most cases, your users will only run this the first time. What about VSTO applications? If your VSTO application is deployed via a file share or the intranet zone, you will not be impacted.

    If your VSTO application is deployed via the Internet zone, you may be impacted. There is no executable for a VSTO application, just an assembly, so you don’t have to do any extra signing. However, the following is true: If you sign your deployment with a certificate from a CA, everything will work fine, and the Smart Screen filter will not interrupt either the setup.exe or the vsto file from installing the app or keep the app from running. If you are using a test certificate, setup.exe will be caught by the Smart Screen filter. If you click ‘Run Anyway’, it will install the prerequisites, but it will not let you install the VSTO application.

    If you install the test certificate in the Trusted Publishers store, setup.exe will still be caught by the Smart Screen filter, but the VSTO application can be installed and run. This is strongly advised against, as installing the certificate on the user’s machine introduces a significant security risk.

    Which method to you recommend? The advantage of the post-build command is that it is transparent. You can easily go into the Build properties and see there is a post-build command. A pre-publish command is kind of hidden in the project file.

    However, everybody has to have signtool.exe in the same place, and for us that’s a non-starter. Also, if I did leave the post-build command in there, someone might change it to match their path and check in the change, causing a problem when we actually try to build the application for production.

    I used the post-build methods to test my build command until I got it to work, and then ported it to a pre-publish command. To summarize, a flowchart: In summary, here’s a flowchart to help you easily see whether your users will get the Smart Screen filter when they install your application on Windows 8. One last note: The first version of VS2012 had a bug where the bootstrapper created when publishing a ClickOnce application would not work on a Windows XP machine. This problem was fixed in the first update. edit: Fixed build paths, some ’s were missing.

    Added recommendation. –Robin 2.26.2013 edit: After publishing this article, I heard from a couple of people who were still having problems. Please check out if you are still having problems with the Smart Screen filter, or getting the dreaded “exe has a different computed hash than the manifest” error. –Robin 4.14.2013 Tags: Posted in,.

    A while back, I wrote an article that shows you. The article assumed that you already had a Windows Azure account. Since prequels are so popular in Hollywood (Star Wars I-III, anyone?), I thought I would write a prequel to explain how much it costs to host your deployment in Azure, and how to sign up for an Azure account and create the storage account. Hopefully, this article will be more popular than. Show me the money How much does it cost to host your ClickOnce deployment in Windows Azure Storage? Well, for a pay-as-you-go account, here are the costs as of today, which I found by going to and clicking on “Pay-As-You-Go”. Windows Azure Storage.

    $0.15 per GB stored per month. $0.01 per 10,000 storage transactions Data Transfers. North America and Europe regions. $0.15 per GB out. Asia Pacific Region. $0.20 per GB out.

    All inbound data transfers are at no charge. Let’s take an example. Let’s say we have a deployment consisting of 150 files and a total size of 30MB.

    We have 100 customers, and we are going to publish a new version every month, starting in January, and all 100 customers are going to update to every version. At the end of the year, how much will this have cost us? Put your mathlete hats on and get out your calculators. Here we go The storage cost for one month = $0.15 / GB. 30MB. 1GB/1000MB = $.0045.

    So January will be (1.value), February will be (2.value) because we’ll have two versions. March will be (3.value), and so on until December when it hits (12.value) because we have 12 versions stored. After calculating that out for the whole year, the total cost of storing the deployment files for the year will cost $0.2475. This is affordable for most people. Let’s talk about the storage transactions. If you have a file bigger than 32MB, it is one transaction per 4MB and one at the end of the list of blocks. If the file is smaller than 32MB, it’s 1 transaction for that file.

    All of the files in our case are less than 32MB. So when we upload a new version of the deployment, here are the costs: Storage Transaction cost when uploading once = 30 files. $.01/10000 = $0.00003.

    Data Transfer costs are free going up, so nothing to calculate there. How about coming back down to your customer? Transaction cost when downloading once = 30 files. $.01/10000 = $0.00003. Data transfer cost when downloading once = 30 MB. 1GB/1000MB.

    $0.15/GB = $0.0045 Now you’re wishing you’d paid attention in all of those math classes, aren’t you? And we’re not done yet. Let’s calculate our total for the entire year. $0.00036 = Storage Transaction cost for uploading 12 versions throughout the year. $0.00 = Data Transfer cost for uploading 12 versions. $0.2475 = Storage for 12 versions uploaded once per month and retained throughout the year. $0.036 = Storage Transaction cost for downloading 12 versions for 100 customers.

    $5.40 = Data Transfer cost when downloading 12 versions for 100 customers. So our grand total is $5.68386, which is an average of 47 cents per month. For more detailed information on Windows Azure storage costs, check out from the Windows Azure Storage Team; it was written before they eliminated the Data Transfer cost of uploading to blob storage so don’t include that cost. Thanks to for clarification, and for providing the link to the Windows Azure Storage Team blog. Hook me up with an Azure account You have three basic options.

    If you have an MSDN subscription either through your company or because you are a customer, you probably get an MSDN benefit that more than covers your ClickOnce deployment costs. The basic mechanism for signing up will be similar, but the way you set up your storage account will be the same, so that information below should work for you as well as for those who have no MSDN account. You will have to give your credit card to cover any charges over the free usage benefit. If you want to try this out for free without giving your credit card, you can sign up for a. At the end of 30 days, you will have to delete the storage account and set it up on a real account if you want to continue using it. (If you use the same storage account name on the new account, the URL will be the same and your users will be able to pick up updates even though you changed accounts.). If you sign up for a pay-as-you-go account, you have to give your credit card, but you get a free benefit which would make my deployment example free for the first 3 months.

    Then at the end of 3 months, it will start charging your credit card, and you will not have to move your storage account. Let’s take a look at how to sign up for this type of account. Go to This should take you to the Windows Azure Platform Offers shown in Figure 1. Figure 1: Windows Azure Platform Offers Click on the Pay-As-You-Go tab and then click the Buy button on the right. Next, you will be given a choice to sign up for a new Windows Live account, or use one you already have (Figure 2). Figure 2: Sign up or sign in. They are going to send you e-mail on this account, so be sure it’s an account you actually check periodically.

    After logging in with your Windows Live account, you will be prompted for your profile information (Figure 3). Figure 3: Profile information. Fill in your address and phone number and click the Next button.

    You will be prompted for company information (Figure 4). I think you’ll find that a lot of people work for “n/a”. I doubt Microsoft looks at that information, but you can amuse yourself by putting in the name of the most popular fruit in America, just in case someone IS looking at the company names — give them a surprise.

    Although, it is widely reported that Apple uses Windows Azure Storage for their new iCloud service, so it might not surprise them at all. (Google would definitely surprise them!) Figure 4: Company information Now they will ask for your Service Usage Address. (You can check the box to use the information you filled in on the profile page.) This is displayed in Figure 5. Figure 5: Service Usage Address. Fill in the information and click Finish.

    Next you will get directions to close this page and go to the Services page. You will find yourself at the Customer Portal for the Microsoft Online Services (Figure 6). Figure 6: Customer Portal for Microsoft Online Services Now you get to pick a plan. If you pick the Windows Azure Platform Introductory Special, they provide some benefit for free for the first 90 days. This benefit covers our ClickOnce deployment example above, so it would be free for the first three months, and then would cost you as noted above. If you’re nuts and you don’t like free stuff and just want to pay now, You can select the Windows Azure Platform Consumption.

    Click the Buy Now button on your selection; you will be prompted to log in again and then taken to the Pricing and Online Subscription Agreement screen (Figure 7). Figure 7: Pricing and Online Subscription Agreement. Fill in your subscription name. Pick something that you like and can remember.

    Then read the Online Subscription agreement as carefully as you read all of these things, check the box and hit the Next button. If you don’t read it carefully, and Microsoft comes to your house to pick up your firstborn child, don’t say I didn’t warn you.

    Next comes the hard part. Fill in your credit card information and click the Submit button. If your credit card information is correct, you will be sent to the Azure portal (Figure 8). I now have an Azure account! How do I set up my new storage account? This is the Windows Azure Portal, which you can reach through this URL: Figure 8: Windows Azure Portal This screen is where you manage all of your Azure services.

    You can define services, set up databases, and set up storage accounts, which is what we’re here to do. Click on the ‘New Storage Account’ icon at the top of the screen as shown in Figure 9. Figure 9:Create a new storage account Next you will be prompted for your new storage account name (Figure 10). This will be used in the URLs for accessing your deployment, so you should probably think twice before making it something like “myapplicationsux” or “mypornpix”. The name must have only lowercase letters and numbers. After you fill it in, it will tell you if it’s already used. If it doesn’t give you any errors, it’s available.

    In regards to the region, you will be asked to either choose a region, choose an affinity group, or create a new affinity group. This is not something you can change later, so choose wisely. (Unlike Walter Donovan in, if you choose poorly, you will not instantly grow ancient and disintegrate.) Figure 10: Create a new storage account An affinity group is basically specifying a location and naming it.

    You can then choose the affinity group when setting up other services to ensure that your compute instances and your data are in the same region, which will make them as performant as possible. Just in case you ever want to use this account for something other than Blob Storage, I recommend setting up an affinity group. Select the radio button for “Create or choose an affinity group”, and then select the dropdown.

    Then you can select the location – be sure to use the dropdown. Mine defaulted to “anywhere in the US”, but it’s better to select a specific region, such as North Central or South Central, or whatever region is closest to you. Then click OK to go ahead and create the storage account. You should now see your storage account in the Windows Azure Portal (Figure 11). Figure 11: Storage Account You can assign a custom DNS entry to your storage account by clicking the Add Domain button on the top of the screen and following the instructions. The URL for accessing your blob storage is on the right side of the screen.

    Mine is robindotnet.blob.core.windows.net. On the right are also the View buttons for retrieving the primary access key that you will need to set up a client application to access your blob storage. With these two pieces of information, you should be able to view your data. For uploading and maintaining your files in blob storage, I use which is excellent, but not free.

    Program diploma eksekutif uitm perlis. P rogram Pengajian Profesional Diploma Eksekutif UITM direka khusus untuk memenuhi keperluan pekerja di Malaysia. Setiap Program akan mencabar peserta untuk berfikir dan mencari jalan dalam me mpertingkatkan pengurusan. Program ini bertujuan untuk memperkukuhkan kebolehan kepimpinan dan pengurusan individu dan organisasi.

    There are free storage explorers available, such as the and the. You should be good to go. Now go read the article on how to actually, and start racking up those pennies. Tags:, Posted in,.

    Now that Microsoft Azure is becoming more widely used, I’m going to do some blogging about it, since I’ve had an opportunity to work with it quite a bit. What better place to start than to do a crossover blog entry on both ClickOnce deployment and Microsoft Azure? So I’m going to show you how to host your ClickOnce deployment in your Azure Blob Storage. To do this, you need an application that you can use to manage blob storage.

    I use the in my example. A free application recommended by is the from codeplex. Here is a video that explains this process in detail, complete with screenshots.

    There is a summary below. To summarize: Create a container in blob storage for your ClickOnce deployment.

    You’ll need the container name when setting your url. I selected ‘clickoncetest’. The only characters allowed are lower case letter, numbers, and the hyphen (-). In your project properties, set your Publishing Folder Location to somewhere on your local drive. Set the Installation Folder URL to the URL that will point to the container in blob storage that is going to host your deployment.

    For example, I set the first one to E: Test clickoncetest. My account is goldmailrobin, so my installation URL will be Publish your application.

    Then go to the local folder and copy the files and folders up to the container in blob storage. When you are finished, in the root of that container you should have the deployment manifest (yourapp.application file) and the bootstrapper (setup.exe) (and publish.htm if you included it).

    You should also have a folder called “Application Files”. In “Application Files”, you should see the ‘versioned folders’ that contain the assemblies for each version of your application that you have published. When doing updates, you need to upload the versioned folder for the new update, and replace the files in the root folder (yourapp.application, setup.exe, and publish.htm). If you have any problems, you can check the MIME types on the published files and make sure they are right. These can be changed for each file if needed. With ClickOnce deployments, you should definitely be using the option that appends.deploy to all of your assemblies, so you should not have any files with unknown extensions. If you want to double-check, the MIME types for a ClickOnce deployment are explained.

    Remember that with Blob Storage, it is not going to be storing the files that is going to be the biggest cost factor, it is going to be the transfer of the files to and from the client. Tags:, Posted in,. You can use ClickOnce deployment to install Office Add-ins for Office 2007 and Office 2010. It is very similar to deploying a desktop application, but not identical. With all types of ClickOnce deployments, you may include resources that you need to access programmatically. Files with a file extension of.xml,.mdf, and.mdb are assumed to be data and are deployed by default to the ApplicationDeployment.CurrentDeployment.DataDirectory, but non-data files will be found in the folder with the deployed assemblies. With a non-VSTO application, you can programmatically find the location of the deployment by either accessing System.Windows.Forms.Application.StartupPath or by checking the Location of the executing assembly.

    With a VSTO application, the location of the executing assembly does not match the location of the deployment files. The dll for a VSTO add-in is copied from the deployment directory into a separate location, and it is loaded by the host application from there.

    I would guess that this happens whenever you run the host application (such as Outlook), and this is why the Office add-in can be uninstalled, reinstalled, updated, etc., without impacting the host application. The changes don’t take effect until the host application is closed and reopened.

    So when you retrieve the executing assembly’s location, it points to the dll in the run location, and you can’t use that to track down the deployment files. So how do you find the location of the deployment? You have to examine the CodeBase property of the executing assembly. This comes across as a URI, so you have to retrieve the LocalPath from the URI. It also includes the file name of the main assembly, so you have to retrieve just the directory name specifically. Here’s the code in VB: 'Get the assembly information Dim assemblyInfo As System.Reflection. Assembly = System.Reflection.

    Assembly.GetExecutingAssembly 'Location is where the assembly is run from Dim assemblyLocation As String = assemblyInfo.Location 'CodeBase is the location of the ClickOnce deployment files Dim uriCodeBase As Uri = New Uri(assemblyInfo.CodeBase) Dim ClickOnceLocation As String = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString) Here’s the code in C#: //Get the assembly information System.Reflection. Assembly assemblyInfo = System.Reflection. Assembly.GetExecutingAssembly; //Location is where the assembly is run from string assemblyLocation = assemblyInfo.Location; //CodeBase is the location of the ClickOnce deployment files Uri uriCodeBase = new Uri(assemblyInfo.CodeBase); string ClickOnceLocation = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString); When you compare these values for a non-VSTO ClickOnce application, the directories are the same. When I run this code for my Outlook Add-In, I get these values: assemblyLocation = C: Users Robin AppData Local assembly dl3 VBJZ5WH8.6NJ HRZA3JXN.LVG b0520efe 3a5b99ef2e21cb01 GoldMail Outlook Add-In.DLL ClickOnceLocation = C: Users Robin AppData Local Apps 2.0 ZMBZ82EH.TDG WHXVWE4L.GZ7 gold.vsto7a251ffffc5.000010ff9c34a357cc30 If you’ve ever looked at the ClickOnce cache, the ClickOnceLocation will be familiar to you, being in the same format as and location as other types of ClickOnce applications. So the assemblyLocation is where the dll is actually being run from by the hosting application (Outlook in this case), and the ClickOnceLocation is the location of the other deployment files.

    Application

    Any files that you deploy with your VSTO add-in and want to access programmatically can be found there. Tags: Posted in,. When you are hosting a ClickOnce deployment on a webserver, you need have certain MIME types defined so the server knows how to handle the files. You can host a ClickOnce deployment on any server regardless of the operating system. So you can host a ClickOnce deployment on an Apache server just as easily as a server running Microsoft Windows Server. You just need to set up the right MIME types.

    When you install the.NET Framework, it registers the MIME types automatically. This is why you don’t have to set up MIME types if you install IIS on your desktop machine and test your deployments by deploying to localhost. Carrying that forward, if you have the.NET Framework installed on your server, the MIME types should already be registered. This is generally one of the first things to check when you’re having problems downloading the deployment.

    A definite sign that your MIME types are not set up correctly is if your customers try to install the application and it shows the XML of the deployment manifest (the.application file) in Internet Explorer rather than installing the application. Here are the basic MIME types you need for every ClickOnce deployment:.application – application/x-ms-application.manifest – application/x-ms-manifest.deploy – application/octet-stream If you are targeting.NET 3.5 or.NET 4.0, you need these as well:.msp – application/octet-stream.msu – application/octet-stream If you are deploying an Office application (VSTO add-in), you need this one:.vsto – application/x-ms-vsto If you are deploying a WPF application, you need these:.xaml – application/xaml+xml.xbap – application/x-ms-xbap Click one of these links to see how to set MIME types in. If your application is hosted on an Apache webserver, you can set up your own MIME types by putting entries in the.htaccess file in the root folder of your deployment.

    The syntax for adding the MIME types is this: AddType Mime-type file-extension For example, for the first three MIME types above, you would add these lines to your.htaccess file: AddType application/x-ms-application application AddType application/x-ms-manifest manifest AddType application/octet-stream deploy You can create the.htaccess file simply by opening notepad or some other text editor and adding the lines above to it, and saving it with the file name of.htaccess. Then copy it to the root of your deployment folders, and those MIME types will work for that folder and all of its subfolders. For more information than you ever wanted to know about.htaccess files, check out. Tags: Posted in,. There are some cool new features in.NET 4.0 and VS2010 for ClickOnce deployment. I’m going to summarize the new features here and provide some links to the details. The ClickOnce engine has been updated and strengthened, and the team that supports the runtime says that the errors that seem to have no solution, such as 'dfsvc.exe has stopped working', should be fixed.

    They have also added enhanced logging and the option to set the location (and name) of the ClickOnce log file — no more searching through your Temp folder! What’s cool about these changes is that they apply if you install.NET 4.0 on the computer, regardless of the version your application targets.

    So if you have a Windows Forms application that targets.NET 2.0 and you are having problems installing it, you can install.NET 4.0 on the computer and turn on the verbose logging. This has already been useful to me, so I will blog about it next. They have fixed “the certificate problem” in all cases. The problem is discussed in detail. The basic problem was that when you changed the certificate used to sign the ClickOnce deployment, the customers would have to uninstall and reinstall the application. They fixed this in.NET 3.5 SP-1 if you used automatic updates, but not for programmatic updates, and not for VSTO projects. Now they have fixed it in all cases when targeting the.NET 4.0 Framework.

    With VS2010, you can configure your application to target multiple versions of the.NET Framework. Of course, this doesn’t mean it will run on multiple versions – you will have to verify that yourself. To use this feature, you have to manually edit the manifest files and app.config file and re-sign the manifests. For details, click. For XBAP applications (browser-hosted WPF applications), these can now elevate to Full Trust just like any other ClickOnce application. For more info, check out.

    For VSTO projects, you can now with one ClickOnce installation. Like the, it’s all for one and one for all. All of them are installed together, and if you uninstall through Programs, it uninstalls all of them.

    For VSTO projects, you also now have the ability to do some post-deployment actions. For example, you can create registry keys, modify a config file,.

    Another interesting change for VSTO projects is if you are targeting the.NET 4.0 Framework, you no longer have to include the Primary Interop Assemblies as a prerequisite. The type information for the PIAs that you use in your add-in is embedded into the solution assembly and used at runtime instead of the PIAs.

    And last, but not least — in.NET 3.5 SP-1, they quietly introduced the ability to create your own custom UI for your ClickOnce deployment, while still using the ClickOnce engine to install and update your application. They have improved this feature for.NET 4.0; check out the walkthrough example. I think there’s something useful in the new features for everyone. If there are other features you would like to see – other than “install for all users”, which is a complete paradigm shift – please leave a comment.

    I will summarize the requests and pass them on to the ClickOnce team at Microsoft. Tags: Posted in,. People frequently ask about the future of ClickOnce deployment. I hear and read things like “Microsoft hasn’t updated their ClickOnce blog since 2006.” “They never change anything in ClickOnce.” “You never hear anything about ClickOnce deployment updates.” “Are they going to keep supporting it?” “Why doesn’t Microsoft use ClickOnce themselves?” The answers to those questions are: 1.

    It’s not sexy so nobody talks about it. Yes they do.NET 3.5 included ClickOnce deployment for VSTO applications, which is awesome.

    And SP-1 included optional signing and hashing, file associations, and other fun stuff. You do if you know where to listen.

    They use it for many of their apps used internally. I don’t think they can use it for.

    Can you imagine what the prerequisite list would look like? The release of Silverlight 4 was even noted on one of the Apple News sites. How does “I created this really cool component that you can embed in a WPF application and it cleans your computer screen and tidies up your desk” compare with “I figured out how to install this really cool component on your computer.” See what I mean? Deployment is like delivery. You don’t ever think about how your books get from that cool page on the web to your in two minutes (or, if you’re a traditionalist, to your front porch in two days), but aren’t you excited when they show up?

    Even though Microsoft doesn’t go on Oprah to discuss their feelings about ClickOnce deployment, I have discovered over the past few months that they really do care about it. Saurabh Bhatia, the ClickOnce expert at Microsoft, has been helping me over the past year to respond to some of the more difficult questions in the forums. When I attended the MVP Summit in February, I met with Saurabh and some of the other people who work in and around ClickOnce.

    The 1-hour meeting stretched into 3-1/2 hours as we discussed feedback and information I had collected from the MSDN Forums, StackOverflow, blog articles, and from individuals who e-mailed me or talked to me after my presentations. I passed on complaints, common problems, and most frequently requested new features. They really wanted to know, and were glad to get the information.

    In return, they provided me with a look at what’s coming in.NET 4.0 (that’s the next blog post). Since I’ve returned, they have followed up with answers to my questions.

    (They were sending me e-mails with answers before I’d even left Washington!) Saurabh and one of his cohorts, Jason Salameh, continue to provide resources to help me support the ClickOnce Deployment community, and Saurabh set up regular meetings just to touch bases and help me with any difficult issues or questions that come up that I can’t answer. I think of it as a “Stump Saurabh!” session, but so far I’ve only managed to stump him once (proxy authentication). I learn something new with every conversation.

    Also coming soon is an update of the Patterns and Practices Smart Client Software Factory and the ClickOnce documentation for it. (I know that because they asked me to do the update to the docs. I was so flattered!) It’s safe to say that Microsoft will continue to support and enhance ClickOnce deployment.

    My next blog post will be a summary of the new features available in.NET 4.0. If there are features you want, post a comment and I’ll pass it along. If you have questions about problems you’re having with ClickOnce deployment, please post a question in the I’ll see you there. Tags: Posted in,. In ClickOnce Deployment, it is a common belief that you can not pass arguments to an application unless:. The application is deployed to a web server, and.

    The application is online-only. If you are interested in passing query parameters to an online-only application deployed to a web server, check out the. About offline applications, or applications deployed via a file share, that page says this: However, this is no longer the case.

    I suspect it was changed when they added the ability to do file associations in.NET 3.5 SP-1. It turns out that you can now pass parameters to:. an offline ClickOnce application,. a ClickOnce application deployed to a file share, and even to. an offline ClickOnce application deployed to a file share.

    And of course you can pass parameters to an online-only application using query parameters, but we already knew that (see article referenced above). Here’s how you call the application and pass the arguments. //Get the ActivationArguments from the SetupInformation property of the domain.

    String activationData = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData; Here are three different ways to pass and receive arguments:. Pass a file path and name as a URI.

    This mimics what happens when you set up a file association and double-click on a file with that extension. The argument will start with “file:”. Pass a query string with key-value pairs in it. This is the same way you pass and parse query strings for an online-only application. The argument will start with a question mark. Pass one value or a list of comma-delimited values. Locate the shortcut for the application.

    The first thing you need to do is locate the shortcut in the start menu for the application you want to run — this is made up of the Publisher Name and Product Name. Here is how to find the location of the application’s shortcut. Process.Start(shortcutPath, argsToPass); The argument string that you pass can not have spaces or double-quotes in it. If you pass a b c, you will only get a on the receiving side. If you pass “a”,”b”,”c”, you will get a.

    If you need to pass arguments with spaces, pass your arguments as a query string. How to create the argument string to be passed, and how to parse it on the receiving side. Case 1: Sending file path and name. This mimics what happens when you use the ClickOnce properties to set up a file association, and the user double-clicks on an associated file. Build the argument string. Search:. Pages.

    Archives. Categories.

    Blogroll. RT @: 'The FBI does not do investigations like this.' The Federal Bureau of INVESTIGATION 'does not do INVESTIGATIONS like this tweeted.

    Did.something. to my left shoulder.

    Hurts like a big dog, and can't raise my arm much higher than my waist w/o sev tweeted. RT @: Hello, female high school student here. I would just like to say that the emergence of this whole 'teenage boys should g tweeted. RT @: Why, because you want to force Dem. Senators in red States into a tough vote. This is pure politics.

    Tweeted. RT @: The Wildest Conservative Reactions To Kavanaugh Sexual Assault Allegations via @ tweeted.

    ...">Install Clickonce Application Programmatically(29.02.2020)