The 'DefaultLocation' for my application is set to '[ProgramFilesFolder]\MyApp'. Now I would like the user to select what drive to install this application to. I know this is accomplished through the 'Installation Folder Selection' dialog, but I want the user to be able to select a drive only, not the entire path.
My question is how do I capture what drive the user selected from the 'Installation Folder Selection' dialog and use that drive letter to tack on to my 'DefaultLocation' variable?
Example: If the user selected "M:\" from the installation folder selection dialog, I want to install to "M:\Program Files\MyApp" or if the user selected "E:\", then install to "E:\Program Files\MyApp".......
I never did that but I think its possible...
Select you setup project. Then, click the "User Interface" button in the toolbar of the Solution Explorer.
Then you should see the "User Interface" window (left on screenshot). You will see the "Installation Folder" dialog. Delete and add your own dialog by right-clicking on the "Start" node and selecting "Add Dialog".
No dialog exists that lets you select a drive. You may use the RadioButton and predefine 3 most common drive letters. I know this is not neat but its a workaround if you don't wan't to purchase a tool.
You can create setup projects with a project type in Visual Studio 2010 that's name is Setup/Deploy Project.
Or Visual Studio 2010 has a Install Shied Limited Edition project.
So you can use this and create more professional setups.
Related
As the title describes, I am trying to skip the folder selection form when update the installed application via setup project in visual studio(casue the user already selected folder path when they installed the app). I googled online and find a way to disable folder form: http://www.codeproject.com/Tips/437285/Visual-Studio-Deployment-Setup-Disable-Installatio. However, How to know if it is installation or upgrade? If we know it is upgrade, how to get the installation path?
Thanks in advance!
I do not find any approaches to skip that folder form. This should be the reason that many installer tools exist in the market. Since my app is very small, I simply disabled the folder selection dialog. For anyone who are interested, please check this URL: http://www.codeproject.com/Tips/437285/Visual-Studio-Deployment-Setup-Disable-Installatio
If you saved the original install location in the registry, for example by saving [TARGETDIR] in a registry item, then you can retrieve it during an upgrade. You find out you're doing an upgrade because it will set a property called PREVIOUSVERSIONSINSTALLED. The problem is that there is no way to wire it all up in a VS setup project. You want the browse dialog there (not deleted) but you want to skip it if PREVIOUSVERSIONSINSTALLED has been set, and there's no support in VS setup projects for that. You'd need to go into the ControlEvent table in the MSI file and figure out how to skip the browse dialog, as well as have the Back button skip over if necessary, and that's just very difficult.
What's the actual issue? Visual Studio upgrades are complete installs that uninstall the previous product and install the new one wherever the user wants, so why is it necessary to install in the same location as the previous install?
With Resharper generate option (Alt+Insert), you can create a new folder from the solution explorer in Visual Studio.
I always used this feature for some years.
I click on an existing folder or at the root of a project and press 'Alt+Insert' and the last option is 'New Folder'.
Today, one of my co-worker who have seen this feature on my computer just tried to reproduce the behavior on his computer but without success; the 'New folder' option is not visible.
Is there any option in Resharper to be able to see this option in the generate popup?
Most likely keyboard shortcut got messed up. Go to Tools -> Options -> Environment -> Keyboard.
Search for Resharper_Generate command and assign your preferred shortcut key (alt + insert). That should do the trick.
The "New Folder" option only appears when the focus is on a folder or a project. If you display the menu on a file, it doesn't appear.
I have CP210xVCPInstaller_x86.exe software i want add it in my visual studio application.when i an installing my appllication need to instal "CP210xVCPInstaller_x86.exe" this software pls provide the screen shots or steps.
pls give the steps
Try the following
Open up your setup project
Select the Application Folder
Right click, Add/File...
Add CP210xVCPInstaller_x86.exe
And that should be it.
Edit
To get CP210xVPInstaller_x86.exe to execute, right click on the filename and select the properties window. In the properties window, set Condition to True
I want to Change default installation path which is Program Files in windows application When Creating setup. I tried but i couldn't do that please tell me solution.
Right click on your setup project
root in Solution Explorer and choose "View -> File System"
Click on (select)
"Application Folder" in the window
which opened.
If you look in the
"Properties Pane" in Visual Studio there is an entry
called "DefaultLocation". Change this
to point it somewhere besides
"Program Files".
Default value for location is [ProgramFilesFolder][Manufacturer]\[ProductName]. These are placeholders variables which are looked up when you compile the setup project. [ProgramFilesFolder] is the one which will point to "Program Files" in an English version of Windows.
In a Visual Studio Setup project, you control the default install path by setting the DefaultLocation property of the Application Folder folder, within the File System Editor.
This, in turn, as you've found, defaults to [ProgramFilesFolder][Manufacturer]\\[ProductName]. You can either replace this property entirely or you can modify these properties.
Ex: D:\\[Manufacturer]\\[ProductName]
Here it is
Right click on your setup project root in Solution Explorer and choose "View -> File System"
Click on (select) "Application Folder" in the window which opened.
If you look in the "Properties Pane" in Visual Studio there is an entry called "DefaultLocation". Change this to point it somewhere besides "Program Files".
The other solutions don't work for VS 2012 and above. Please follow these steps:
Expand Setup and Deployment Project.
Select Project Assistant, bottom you will find "Installation Interview", click on "Installation Interview".
You can see the Installation Dialogs, select "Yes" for option "Do you want your users to be able to modify the installation location of your application?"
I want to include a folder in a setup project so that when I deploy that setup the complete folder is also deployed to the install location.
Right click the setup project, and select "View" > "File System", and from there you can access a lot of special folders like install folder, appdata, desktop etc, and add files to there, that will be created when you install the application. Make sure to set the "alwayscreate" property to true.
The answer is good because it gave me clue on how to fix my problem. I think that my requirement was slightly different. I had to include contents of another library project from the same solution. This seems to work fine for Console Applications/Web Sites, but Installer for some reason was not including it. There might be a better way, but this worked for me. In similar fashion, right click the setup project, and:
- Select "View" > "Custom Actions".
- Right click on "Install" folder and select "Add Custom Action".
- Double click on "Application Folder"
- Click on "Add Output..."
- Select the project from the dropdown and in my instance I selected "Content Files", OK it and give it a name.
This will include any resources, from the selected project marked as Content and that are marked for copying, into your installer.