What are ways to update a windows form application? - vb.net

I need suggestions on how to update my application. The form application is going to be put on a drive for many users to be using non stop all day. What are ways to update the program or allow updates to the program while it being use? If I update the program and recreate a new build for it, trying to copy paste over the old application will not let me if someone else has it open. Open to any suggestions.

Option 1: Deploy the app with ClickOnce and set it to check for updates every time it runs.
ClickOnce:
In your project settings, click on the Publish tab.
From here you can configure where the app publishes to and if it should be installed or available online only.
Once you have it all configured you will use the Publish Now button to compile and upload your update to the publish location. Each time your users open the app it will check for updates at your set location. To have your app check for updates programmatically use code like the one found at this MSDN link - https://msdn.microsoft.com/en-us/library/ms404263.aspx
You should note that users will no longer run an exe directly and you won't copy your exe to the publish folder. Your users will have to click on a file that has the extension of .application. The users could create a shortcut to this .application file to place on their desktop or wherever they want.
Also note that if using ClickOnce and you publish a bad version (with a bug for instance) then your users have the ability to revert back to the previous version so that they can continue using the app while you fix the bug. Your users also have the option to skip an update so you'll want to inform them to never skip the updates.
Option 2: Create an app that publishes your main app
I'll admit that this answer is not a great way
You could create another exe for the purpose of publishing the main exe. The publishing exe will simply try to copy the new exe over the old one and keep trying until it is successful. It will be successful when all instances of the program are terminated.
Option 3: Use a database
Have your app check a database value that indicates an update is available. Prompt users using the app to shutdown and don't allow other instances to startup while the database value is set to update available.

You could use nUpdate, a free and open-source .NET-library for updating applications that also cares about the safety of your update packages which is an important fact. Many update routines do not validate the packages they downloaded, which can result in serious damage, if updates are replaced by malware (as it happened to the puush-service some time ago).
nUpdate is especially designed for Windows Forms-applications.
It is still being improved at the moment and the support for WPF-applications will be added soon, but the current version is very stable, yet.

Related

Cannot select latest uploaded version to add to testflight

I cannot select the latest version I have uploaded to seed to beta in external testing. First of all whenever I upload a build two version appearing, that have upload time difference of 5 to 15 minutes between them. One of them gets changed from processing to normal available state, but other does not. But now selecting the available build also selects the processing one and my selection is blocked and I cannot select the OK button because probably my selection is blocked by the processing one. I think it is UI frontend issue at itunesconnect side but it could be something I am doing wrong. Please help me if anyone has been able to tackle this issue if they faced. Please see checkout the attached image.
Update:
I Included <key>ITSAppUsesNonExemptEncryption</key><false/> in my subsequent builds that I uploaded according to the new Export compliance message on the iTunes Connect home page. I am still facing the issue. I have contacted Apple Dev support, will keep you updated if I find a solution.
The issue has been mysteriously solved by uploading the application from Application Loader with Aspera turned off instead of using Xcode's organizer window as suggested by Apple Developer support. Make sure you add: <key>ITSAppUsesNonExemptEncryption</key><false/> in your info.plist file before archiving the build. Although mysteriously my previously uploaded builds have also become available for external testing.
Body of email that helped solve the issue:
After further research, it looks like their may be an issue from your
end with your network while trying to upload to this app record in
iTunes Connect.
First, for the best upload experience make sure that all ports and IP
addresses are accessible. Additionally, it’s important to make sure
the internet connection is very good, and that there are no firewalls
blocking the uploads. More information can be found here:
http://help.apple.com/itc/apploader/#/itc8e7ec5a60
Second, it may be beneficial to try using the latest version of
Application Loader. Please note that you can export your project from
Xcode to upload through Application Loader. As a temporary workaround,
once you have Application Loader open, you can go to the File menus
and select the following:
Application Loader > Preferences
Then, select Advanced, and as a temporary workaround you can try
deselecting Aspera and upload the build again. You can follow the
steps below to use the latest version of Application Loader.
Download the latest version of Xcode from the Mac App Store:
-http://help.apple.com/itc/apploader/#/itc8e7ec5a60
Open the latest version of Xcode
Go to the File menu and select Xcode > Open Developer Tool > Application Loader
Lastly, try uploading again to see if the issue persists.
Hello my dear friend there,
I am also having your issue yesterday, I have this similar screen with yours:
The build is duplicated which one of them are processing forever until today.
My personal problem solving was:
Increase my build number in Xcode so that I can reupload my build
Rearchive the build then export for iOS App Store Deployment in Xcode Organizer
Reupload the build using Application Loader
Then try to reconfigure the build in iTunes Connect. For a while it is processing like usual, but it will not take forever, after one hour, the build will be available for testing.
Hope my personal troubleshooting can be applied to your issue too.

How do I detect who runs my application?

I have built some applications that runs from a shared folder within our company network. I have simply placed the .exe-file there. This work fine until I need to replace the file when upgraded. If someone runs said application, the file is locked.
Can I somehowe detect which user currently runs my application? Or even better, can I shut it down?
Bring up the Project Properties and go to the Publish tab.
Set the Publishing Folder to the UNC path to where you want your users to get the program from.
Play around with the Updates and Options. There's an option to make it check for updates every time the user runs the program.
Then run the Publish Wizard.
Now your users can go to that folder and run the setup.exe there. The program will be installed on their local machines so you can update it later.

Adding software setup to installer

I'm writing an installer for an application. Most of the installer is done and working, but I have on more step outstanding. I need some way to add a setup window to the installer, that will take user input like server address and port, etc. and write these to the relevant files for system start-up. This preferably done through a GUI of sorts inside the installer.
I've tried creating an executable file that runs after installation, but this does not always execute on different systems.
Is there a way to add a GUI to the installer itself that executes after the directory structures and files have been put into place?
Thanks in advance.
In general you should seriously consider doing this as a standalone app that runs when the app first runs and needs configuring. Then it's a program that runs in a user context and can be tested and debugged in the normal way. At least consider what the user is going to do if they want to change the server address or the port - will they need to uninstall your app and reinstall it just to change the server details or the port?
The GUI may not run correctly when started from the install for a number of reasons. It may be initiated with the system account if it's a deferred CA. It wasn't started from the interactive user shell, so it probably won't have any idea of a working directory. It's being run from an msiexec.exe process running in the system directory and maybe with a system account - that's not really the place to be doing your GUI configuration.
I assume you're using WiX, it doesn't say so in your question but it's tagged with WiX.
I would have a read of http://wix.tramontana.co.hu/tutorial/user-interface-revisited (or http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/ has a relatively easy to read example), you can add or edit any of the dialogue boxes in the installer, you'll need to download the source to get at the built in dialog, and it does require some "play" to get everything quite right but worth it to get a professional looking installer.

how to upgrade compact framework applications?

i'm looking for a way to manage application upgrades for my compact framework app.
let's say i have v1 of the app installed on my device, and v1.1 has been released. I want the app to make a call to my server to see if there is a new version. since a new version is found, i want to send down the new version of the app to the device and have it installed, replacing the old version.
my first thought was just to have the app download the .cab file and kick off the cab file just before exiting the app. this would mostly get the job done but it would prompt the user to pick the installation location if they have a storage card or other partitions on their device. i would like to prevent any user input and just have the new version of the app installed, replacing the old app.
i'm certain that there are others doing this already and i don't want to reinvent the wheel, here. what application management tools and systems exist for this type of process? how can I facilitate this type of process?
...
EDIT:
in spite of my previous searches before posting this, i just now found this question: How to Auto-Update Windows Mobile application
When I wrote one I relied on launching the .cab file. It was definitely the path of least resistance.
Otherwise, I'd write a simple "upgrade.exe" executable that gets distributed with your app. When upgrading, you'd download the new package, launch your upgrade.exe just before exiting your app, then have that program copy over the new files to your app.

Cocoa - How to copy files to /usr/share?

I'm developing an "installation" like cocoa application wich needs to take care of some http request, some file system reading, copying files to /usr/share, set up cron (not launchd) and ask some information to user.
I discarded PackageMaker since I need more flexibility.
Currently everything is going well, but on my last installation step, I need to:
Delete my previously installed application folder (if exists). It's always the same path: /usr/share/MY_APP
Create again the application folder at: /usr/share/MY_APP
Copy application files to /usr/share/MY_APP
Update a cron job
It's very important that /usr/share/MY_APP keeps protected with administrative privileges, so a regular shouldn't delete it.
What would be the best approach to implement those steps?
BTW, I'm using Xcode 3.2.
Thanks a lot!
Carlos.
Between the preflight script, the postflight script, and perhaps an Installer plug-in for the custom UI, I see no reason why you can't do all of this in PackageMaker.
Note: “Installer plug-in” is a little misleading. The user does not have to install the plug-in somewhere as a separate step; you include the plug-in inside your package, and Installer will use it from there.
The relevant document is a ReadMe file in a sample code project. There's also an Installer plug-in project template in Xcode since 2.0.
Also, an Installer plug-in won't get used if the user does a command-line installation. Of course, they can't install from the command line at all (which includes remote installation onto an office or lab full of machines) if you write your own custom installer.
By the way: Why /usr/share? What are you putting there? There may be a better way to do what you're really trying to accomplish.