I want to attach my own folder name to the "DefaultLocation" during msi installation (using VS 2005). Currently all programs installs at "C:\Program Files (x86)". I want to append some "xyz" path to the installation path during installation. So, once the user clicks next, the path for the installation should be "C:\Program Files (x86)\xyz".
Can anyone tell me how to do this in the windows installer.
The short answer is no, because here is nothing in Visual Studio setup projects to support that. You'd need the ability to change the target directory in the UI sequence after that dialog, that's what's missing.
VS setup projects are limited in their support for all the features of Windows Installer, so migrating to a different tool would be useful if this is the kind of customization you're looking for.
Could anyone tell you how to do this in Windows Installer? Technically yes. You'd need somebody who knows enough about the insides of MSI files generated by VS to design a solution (a custom action based off the Next button?) and change the MSI file manually to do it, and how to repeat that after every build (a post build script), and for you or your company to understand enough to fix it if it stops working. That doesn't seem practical compared to just using a tool that will let you do it. My apologies for the editorial but if VS doesn't support it your choices are limited.
Related
We have a legacy exe installer, that our company runs on Windows Embedded Standard 7 to install a program.
We don't know how to re-recreate it since we don't have any source code for it, no project files, etc... just the exe. We pretty much know what it does:
changes to windows registry
changes to environment variable
changes to windows log
changes to windows service
We currently work on VS2019 and wanted to create a similar exe installer in VS2019, but as far as we can tell it only has msi installer.
There are two questions we need to answer:
A. What program or software created the existing SomeName.exe?
B. If we can not figure out what program created the existing one, what open source or free software should we consider to create an exe installer to get the above steps?
Some screenshots of what dialog boxes we encounter upon install/uninstall are attached:
installation step 1
installation step 2
Thanks
I want to create an installer MSI that will unload and move files I need for my plugin into the user's application folder. In my case the application is Cinema 4D, but this detail does not matter. I need to unload a .cyc file and place it in a specific subfolder under the application folder. In addition to that, I need to add a line of code to a .res file another subfolder of the application.
I want my installer to look nice
I have already looked at WIX, NSIS, Advanced Installer and Microsoft Visual Studio as possible options but do not know how to do what I have to do. I've seen installers that do exactly this - so how do I do this?
Most of the tools mentioned above should be able to help you get the job done, except Visual Studio (its support for building setup packages is quite limited).
Here is a step by step article explaining how to do this with Advanced Installer. You can download a trial version of Advanced Installer from the website, during trial you can access all the features.
Disclaimer: I work on the team building Advanced Installer.
We're working in quite a large project and is having a hard time getting people to configure their Visual Studio correct (tabs instead of spaces etc.). We found a great solution in using the EditorConfig extension for Visual Studio.
However there are still some developers that seems to ignore our request to install this extension to their Visual Studio and hence I'm wondering if there is any way to force an extension to be installed before a solution can be opened, maybe some setting in the .sln file?
No there is no such option built-in. If your machines are domain joined, you could push out the installer through System Center or domain logon scripts.
You could cheat and create a solution level pre-build step. Create a target file named: before.{solutionname.sln}.targets and store it next to your solution file. Check it into source control. In the targets file you can use standard MsBuild to see if the extension is installed (you'll need to check the file system probably) and if not present force the installation by calling vsixinstaller.exe to trigger the install.
I am developing a Visual Studio 2010 extension (VSIX project) to add some extra properties to the entities in the Entity Framework designer. In addition to registering the appropriate classes for MEF discovery, I would like a T4 include file to be copied to the %ProgramFiles%\
Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity
Framework Tools\Templates\Includes folder when the extension is installed, but I don't know how to do it and the VSIX properties page does not seem to show any option for this.
So my question is: is there any way to have a given file being copied to a given location when a VSIX project is installed?
Using VSIX only, no, there is not.
Whole contents of VSIX package are during installation simply unzipped into your local extensions directory - and that's END regarding file installations.
Whatever you want to copy anywhere, you must deal with it outside of the VSIX installer. For example - use different installer. Or, for another example, upon first-run of your plugin, somewhere in package.Initialize(), check whether the files in question exist in right places, and if not - copy them there.
Of course, if you want to write to the ProgramFiles directory, you have another barrier in front of you: the UAC protection. To write there, you will need an another executable that your plugin will run in elevation (and asking the user for permission during that, etc) and it only it will be able to copy the files there. Well, of course, unless you happily assume that everyone always run their VisualStudios "as administrator" and simply ignore the UAC and your users' tears.
I am wondering about the need for an install wizard for my little Windows Forms application. No database access, just file access on a shared network drive.
I have seen times when an executable is sent in an email, copied to a desktop and used.
Other times when an 'install wizard' seems to be used to set up the application.
What dictates the need for this or not?
And if I want to use one - what needs to be added to my windows form app?
If your application is truly just an .exe file, it's probably okay to distribute it as-is without an installer. This might be preferable for more advanced users, because they won't have to worry about cleaning up a broken/unwanted install - they can just delete the file and be done with it.
On the other hand, most Windows users are used to working with installers, and having shortcuts automatically created on the desktop or Start->Programs. This is where an .msi can really help. Also, using an installer will usually put your application in the "Add or Remove Programs" control panel, which most people know how to use. Also, if your application is more than just a single .exe file (e.g. multiple .dlls and resource files), you'll probably want to use an .msi.
Creating an installer is easy, look at "Setup Projects" in Visual Studio.
An installer is almost always a good idea, because it can work out what dependencies your application has - which you may not even be aware of.
It also looks more professional and users will have more confidence in it.
There's an open source installer called NSIS that's pretty good, if you find the Visual Studio setup wizard too clunky, as I sometimes have.
Sometimes simply copying a file just isn't sufficient, this is when you need a setup program.
Checking if the correct version of .NET is installed
Installing C++ runtime dependencies
Creating a desktop shortcut
Setting up "default" configuration data
Adding exceptions to the Windows Firewall
Preventing installation on unsupported systems such as Windows 95/98/ME
etc, etc.
If your program is a stand-alone application with no dependencies and can run on a stock-standard install of Windows 95... then you don't need to worry about setup ;) But if your app has any external dependencies then you want to spend some time on setup.