Auto Update application windows desktop using win32 - windows

I am trying to auto update my current application to new application in windows desktop using win32 api . And my application is running in background. so is there any api Microsoft providing for auto updating application or is there any procedure .please help me so that i can make update my appilication in windows desktop in vs 2005 using win32 .
Thanks
KamalBhr

AFAIK there is not Win32 API nor should there be. You will have actually have to write it. :|.
If you expect frequent updates to the application, e.g., in an environment where you want to push updates without user interaction.
on application start, spawn a copy of the the executable.
either periodically or through user action, check if there are updates available.
kill the process, replace the necessary files. restart the application.
as you spawned a copy of the executable you are free to overwrite it whilst the application is running.
Alternative, download the update packet to a directory. On next application start check if there are updates to be applied.
HTH,

Related

Using RestartManager to manually restart application and/or when upgrading

I have up until now been using my own restart application utility.
But I now see that there is a dedicated restart manager since Vista.
This is useful for me because I now limit my application to Windows 7 or higher.
Currently, I offer a manual restart when the user changes the application language.
Also, after they have downloaded an updated installer (Inno Setup) it shuts the app down and starts the setup program.
I can't work out how to do these thing with the MFC restart manager. It mentions about adding one line of code to my MFC app and how to simulate scenarios. But what about my specific situations?
If you can please direct me to a good tutorial?
Sorry if my question is off topic and I will remove.

Uninstall application before installation of Windows Mobile application through CAB file

I am new to the world of Windows Mobile app development and C++. I have created CAB file to install my Window Mobile application on device. However at the time of installation I should be able to check if application is already installed. If yes, stop the application if it is in running state, then un-install it before proceeding with current installation.
I suppose this would be done with the help of Setup.dll file. I need help to get above mentioned scenario working. All posts related to Setup.dll that I came across only speak about its basic creation as shown here https://msdn.microsoft.com/en-us/library/aa924308.aspx?f=255&MSPPError=-2147217396
You need to follow the ce_setup skeleton and implement the default ce_setup functions.
In the codeINSTALL_INIT Install_Init( HWND hwndParent, BOOL fFirstCall, BOOL fPreviouslyInstalled, LPCTSTR pszInstallDir ) function implement your 'un-install'.
For example create a function that checks if a process is running and kill it. Remove App Counter for the application. Etc., etc. This function can nearly use everything you can use normally. Possibly start with an application that does the un-install and then use the same code in setup.dll.
Finally you need to add the setup.dll to your cab.

Inno Setup Automatic Setup update [duplicate]

I have an executable application setup.exe for Windows that I realized with Launch4j/Inno Setup based on Java.
I often frequently release new versions and bug fixes.
I would like to know if there is a mechanism to install updates automatically?
Inno Setup does not have any built-in mechanism for implementing automatic updates.
You need to implement that yourself:
Make your application check for new versions (against your application webpage?). E.g. on startup (on a background thread?)
If the application detects a new version, make it download an installer to a temporary location.
Make the application execute the downloaded installer. You can make the installer run in silent mode (/silent switch). The application should close itself, to unlock any files it is using, to allow files update.
This approach will need the update installer to prompt for Administrator privileges. If you need the update to proceed completely seamlessly, you will have to implement a service. For that, see Deploying application with .NET framework without admin privileges.

In Windows, how can I give other applications the ability to programmatically launch my application?

I've written a Windows application. I want other applications to be able to programmatically launch my application. How can I achieve that and what are the considerations involved?
Edit: To clarify, I'm not asking how other applications can launch my application; I'm asking what I can do to ensure that other applications are able to launch my application.
To be able to launch an application without having to know the explicit path to where it is installed, you need to register it with Windows by adding it to the App Paths registry tree.
This is typically done during application installation.
See MSDN - Application Registration
In Windows, there is no security preventing an application from running another application (in user mode at least, to run in admin mode would require the other program to be executed in admin mode, or else to prompt the user to run it in admin mode). The other application simply needs to know the path to the location of your .exe file and it can execute it. If the other program doesn't know the exact path, but it knows where to look and what your program .exe is called, it can search for it in the file system before executing it as well.
As for specifically how they would launch your program's .exe file, this will depend on the the language their program is written in as to how the system API to launch the .exe is called.

MSI: An Application is running during silent update

I have an application that was installed as MSI package, I have next version of application that I plan to install in silent mode by special program.
When application is running I catch an issue: not all components of application installed
immediately, some of them will be really ready only after reboot. And I get unstable application.
I can check - is application running and wait until it closed, but I can't check the situation when user click on shortcut during silent installation.
How I can avoid this? Can I lock application during installation?
I suggest implementing Restart Manager support. Vista or later will attempt to shut down your application via the Restart Manager, you can decide how to handle it within your application (prompt user, autosave, something else, etc).
You won't catch the situation where the user starts the application during update, but it will handle multi-user sessions more gracefully than your custom code will.

Resources