Installation of demo project - best practices - installation

Using Windows Installer (targeting XP and Vista), is there a best practice for installing demo projects and files with your application?

From experience installing on Vista/XP I would recommend...
1, Install the source code/project/solution files into the 'Users' directory for Vista. That way when the user opens up the demo and compiles they have write access for generating the output files. If you put the files into the 'Program Files' directory under Vista you do not have write access and so the compile will just fail.
2, Add a shortcut to the solution to either the desktop or the start menu so that the user can then get access to it without having to know the exact location. Under Vista/XP when you install into the 'Users'/'Documents and Settings' directory it is not easy to find the installed files because they are placed inside a directory that is not shown unless you select 'Show Hidden Files' in file explorer.
3, I would recommend you sign the installer using your publisher certificate so that when the user gets a UAC dialog on Vista they can see the name of the publiser and be more likely to continue with the process.
4, At the moment the split between Visual Studio 2005/2008 is about 50%/50% and so make sure you provide both versions of the project/solutions files. Alternatively just supply the VS2005 files and let the user upgrade using the wizard in VS2008.

Related

How do I compile a UWP application to a stand-alone EXE file?

I have a UWP application. I can run it inside of Visual Studio by using the Run button. I also know how to create an App Package and distributed it via App Center.
What I can't figure out how to do is build an EXE file that I can run on my own computer without launching Visual Studio (or copy to another computer). I found the EXE in the project folder under bin/x64/Debug (or bin/x64/Release), but it won't run. In fact it does nothing when I double-click on it.
What am I doing wrong?
The easiest way I have found to get apps installed on computers for non-technical users is to give them the output of that Create App Packages submenu, which includes a ps1 script and certificate file. If you give it to them as a zip make sure they unzip the whole folder first, and run the ps1 script from the unzipped folder. If Developer Mode is not enabled on their computer, the settings dialog to enable it will open automatically, and they just have to flip the switch. Otherwise, they are just pressing Y or A in the PowerShell window to continue through the installation process.
It's not too bad, the whole thing takes about 30 seconds if you breeze through it, but I believe you need admin rights on the computer you're installing on, there's a UAC prompt at some point.
I found the EXE in the project folder under bin/x64/Debug (or bin/x64/Release)
The exe file is the uwp executive core, but it could not run directly, because it has some dependencies need to be packed together, so we need use Visual Studio to create package for your app. And this document contains detailed steps you could refer.
After getting the installation package, we need the side-load, and please note:
If you are not publishing your app and simply want to sideload an app package, you first need to trust the package. To trust the package, the certificate must be installed on the user's device.

Visual Studio Setup Project: Application Folder - Default Location

In a visual studio setup project, is there a way I can enumerate the logical drives on the target machine and set a path on a drive on which windows is not installed as the value of the property "DefaultLocation" for the Application Folder instead of the usual [ProgramFilesFolder][Manufacturer]\[ProductName] ? Or is there a way I can force the users to select the installation path on a drive other than the windows drive, without which the installation should not proceed?
Thanks in advance.
No, not in a Visual Studio setup project. There is no support for running any code during the UI sequence, and so there is no way to check the user's input if offered a dialog to choose the location.
Is there a problem you're trying to solve and this is the solution you've chosen? It's not clear why the standard location in Program Files is unacceptable.
If you were willing to force the issue you could write a launch program that would find the drive and then install the MSI (omitting the destination folder dialog) with a command line that includes TARGETDIR=[folder path for install]

Visual Studio 2015 Update 3 installation failed

I have a problem with installation Visual Studio Professional 2015 Update 3. I don't know what cause the problem, but setup is failed every time in each setup configuration. Setup manager shows me following error and warning:
Microsoft Visual Studio Services Hub
The system cannot open the device or file specified
I really don't know how to solve this problem. Does anyone know what is wrong and how can I install this program?
Greetings
SOLUTION
I know what was the problem! I didn't check thoroughly the default location where Visual Studio wants to install. On my PC I have installed a 64-bit Windows 7. After many tries of installation I saw that installator chose wrong Program Files folder. It tries to install Visual Studio in Program Files (x86) (dedicated for 32-bit programs). I really don't know why VS installator chose a default folder for a 32-bit programs while my VS is a 64-bit version and also Windows is a 64-bit version.
I hope that this solution will help someone who has the same problem.
Most likely this is because of Windows Installer cannot access the %TEMP% folder (I had similar error once, but with MSSQL setup). So:
First of all check if you %TEMP% environment variable points to the
right location
Then check if the account which is running VS setup has privileges to
access TEMP folder. Better yet, make sure you run setup as
administrator
Finally make sure you have disabled all disk or folder encryption
features
Also just to be sure disable any antivirus software you have running
The error message “The system cannot open the device or file specified” often related to the specific folder is encrypted, you can have a look at this article and try the following methods:
Save the VS installer file to a folder that is not encrypted
Install the VS to a folder that is not encrypted
Turn off encryption on the %temp% folder
To check the encryption of the specific folder, you can right click the folder and select ‘Properties’— ‘General’ tab, click ‘Advanced’ button and confirm the checkbox of ‘Encrypt contents to secure data’ is checked or not.
You can click the ‘log file’ in the VS installer screen that you shared, and find the specific folders that these 2 components ‘Microsoft Visual Studio Services Hub’ and ‘Visual C++ IDE Common Package’ stores and check if those folders are encrypted or not.

Create msi installer using visual studio installer

I tried to create a MSI installer for a simple windows project with basic set up. When I ran the built msi file it is not installing anything in the target location neither creating a desktop icon. Though I can find an entry in control panel. I am using VS 2013, not able to understand why it is not creating anything.
Thanks for help.
You should say what you actually did. It won't install anything to the target system unless you put files (or project output) in the Application Folder in the setup project, and it won't create a desktop shortcut unless you right-click the executable in the Application Folder view, create shortcut, then drag and drop the shortcut to the Desktop folder, again this is in the setup project's File System view.
Start here, old but still they way they work:
https://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/

Can a ClickOnce project be configured so that downloaded file is called differently from setup.exe?

I'd like to make it so that when users click the "Install" button, the installer file they download to their local machine is called differently from default setup.exe, e.g. myCoolInstaller.exe. Is that even possible with ClickOnce?
A simple option is to use symbolic links. From the command prompt, whilst in your release folder type:
mklink myCoolInstaller.exe setup.exe
Then everytime you publish to setup.exe, your users can download using the more friendly name. Note that this does not update the publish.htm file - you will need to edit that yourself. In our case, we don't use it - we provide a link to our customers directly to the installer .exe
The setup.exe file that is generated by Visual Studio has very little to do with ClickOnce. It simply bootstraps your pre-requisite installs together and launches your actual ClickOnce app (the .application file) when it's finished.
You should just be able to rename it.

Resources