Create a windows startup application - visual-studio-2010

I wrote a application in VS 2010. How do I make a installer that'll install my application as a windows startup application? I need it to run each time windows starts.

Have the installer add a shortcut to the application in the startup folder.

Related

Visual Studio Advanced Installer - Install a Windows Service with build transforms

I have a .Net 4.7 application which is developed as a windows service. I have an MSI project which does the installation and there is a post install activation script that also gets executed (manually).
I am trying to replicate the old installer using the Advanced Installer Extension in Visual Studio and cant resolve these issues.
The first one is how do I stop Advanced Installer from creating multiple subdirectories in the target installation location. The install parameters have the Application folder set to [ProgramFilesFolder][Manufacturer][ProductName] however, I am getting [ProgramFilesFolder][Manufacturer][ProductName][ProductName]. I have the project Output under the Application folder in the files and folders tab.
Secondly, how do I install the application as a Windows Service. I can see this in the external version of Advanced Installer when I create a new package, but can't find the settings for the one within Visual Studio for the existing package.
Within Advanced Installer extension for VS you cannot configure the install location template, nor a service installation. As you already noticed those settings are available only in the desktop version of Advanced Installer.
As a workaround you can use the [Edit in Advanced Installer] button from VS and then edit the install location template from Install Parameters view in Advanced Installer desktop app.
Also, while in Advanced Installer desktop app you can configure a service installation as exposed in this tutorial.

How do you package/publish a Visual Studio Mac console application, that can run on a windows machine?

This is the first time I've written a console application on the Mac version of Visual Studios. Normally, on Windows I just build the project and zip everything in the \bin\Release folder. When I publish the project to a folder on the Mac, it generates a .dll, .pdb, and 2 .json files. I want to package this and send it to a user to run on their Windows machine. I'm not sure where the .exe is. Honestly, don't know if a Mac would even generate that type of extension.
So, how do you package/publish a Visual Studio Mac console application, that can run on a windows machine? Are the .json files intended to execute from a browser?

How to automatically update an application installed with Inno Setup

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.

How Do I configure my setup in Visual Studio 2010 using Visual Studio installer to check for updates?

I have built an Application using visual studio 2010 and a setup using the Visual Studio installer. Now what I want is whenever the exe is installed on a client machine it should check for updates regularly.
Any Suggestions . Please Help.
It's my experience that most people do this in the app itself, so that when it runs it checks your web site for updates.
Basically you need a web service call to which your app passes the ProductCode and Version of your setup, your MSI file build. At your web host you need a database (or Xml file) that has information on the latest available version and it's download location so that you can return that information to your app, assuming the latest version is higher than the running one.
You're in Visual Studio, so you build a RemovePreviousVersions updated MSI, and that's what you download and install. If the install needs admin rights and your app isn't elevated than you'd launch an external exe with an elevation manifest to get it installed.
I just finished a project similar to this, but instead of using Visual Studio installer libraries, I created a windows service that runs on a 10 minute loop, and when the service detects a new version, it kills the running application and performs a download and copies the new files into the application folder.
There are a few things you need to take into consideration; 1) A way to gracefully warn and then close the application so the user is not angry over a forced kill of the application. 2) A web location to store the upgraded application files, and a web service to advertise the available application versions. 3) A way to queue the upgrades so that when a new version is released not every client will be upgraded at once (flooding your web server with upgrade requests and downloads).
This technique is used by Adobe for upgrading and installing applications such as Acrobat Reader and Flash.

Is there a regedit key in windows that blocks the running of exe files (by services)

I have a Windows Service that runs an exe file and it is working fine under Win7 and Win8 Environments. But when I try the program in a Windows Server 2008 or Windows Server 2012 Environment, the service works but the exe file is not run. So I am wondering if there is a regedit key that blocks running of exe files when they are run from Session 0 or something similar.
I have noticed that Windows 2012 by default blocks running interactive programs. But I have already allowed it by setting the following value to zero.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows
NoInteractiveServices
When you install a Windows Service in Windows Server enviorment, you need to check Allow service to interact with desktop property in the service properties -> Log On.
When this property is enabled, try to restart Interactive Services Detection service.

Resources