How to install files to the Mydocuments folder using Set up project in vs2010 - visual-studio-2010

I need to install the some files under the mydocuments of logged in user. How can i specify the install directory in the set up project

Go to the File System view of your installer project, right click on File System and select Add Special Folder -> User's Personal Data Folder
http://msdn.microsoft.com/en-us/library/s2esdf4x.aspx?appId=Dev10IDEF1

Related

Why in VS 2015 community Manage NuGet creates both packages and scripts folder, and hides packages folder?

If I install AngularJS Core package using NuGet Package Manager, I will get a folder name "package" on the root of the project with the scripts populated, but at the same time a "scripts" folder will be created with duplicates of the same scripts.
Is there any reason for both "scripts" and "packages" folder being created?
Why if I click "Show All Files" the solution explorer will continue to hide the "packages" folder?
The packages folder exist on the solution root and it has all the packages added to all projects inside the solution including any config or manifest files.
If you added a package once, it will be added to the packages folder and depending on this package, some folders will be created inside your project, ex: Scripts, some other packages modify web.config or add some line of code to some files, depending on what the package does.
If you added the same package to another project, it will not be downloaded again, but it will be copied from the local packages folder.
Most of the packages have DLLs, and when you add such package, the project will reference the DLL directly from the packages folder, it will not copy it to the project folder itself.
However, with packages that have content such as scripts, it must be copied to the project folder as it will be published with the project and this mainly happens with the web project itself.
Actually the package folder is not in the project root folder, it is in the solution folder. It will not be added to the solution explorer windows since it was used to manage the whole solution packages for all projects.
(1) The Scripts folder in the "Packages" folder like screen shot 1 was belong to the package, it was a part of the downloaded package.
(2) The scripts folder in the solution explorer like screen shot 2 were added to the specific project as the content folder. My understanding is that just the specific package has this function, for example, it will be added to the setup file if you want to install the app in other machine. But we couldn't install all packages in the "Package" folder for this project.
Actually Haitham Shaddad provided the correct define before, but in short, my understanding is that this script content reference was different from the assembly reference, it was related to how the package members create the package. Of course, if you have the NuGet Package Explorer tool, you would find the structures of this package.
For most nuget packages, only "packages" folder will be created when you restore them. The reason you didn't see it from solution explorer is that it is just a folder created to place the nuget package files and you can change the path of the folder if you want, it is not a part of the project/solution. And if you are using version control, it is also not recommended to check the "packages" folder in to source control.
For the "scripts" folder, it is controlled by the nuget package author and the name of the folder can be anystring. If the author want the folder to be copied and added to the project, they will place it in "content" folder when create the nuget package.

Visual Studio Installer Sub-directory

I am building an install msi using the Visual Studio 2010 installer.
I need to add files to a subdirectory of my installation. I know about the Add Files function but that will add them to the main directory. I don’t see how to add them automatically to a subdirectory. In my case it is the /Report subdirectory.
Right-click your Installer project, go to View->File System.
Now right-click on the 'Application Folder' and select Add->Folder (see screenshot below). Name your folder 'Reports' or whatever you need.
Done.
Now you can place your files under [Application Folder\Reports] on the target machine.

Accessing loose files from Windows Installer

I've built a .msi Installer which has some 'loose files' ie files not in the .msi
For simplicity, assume I have:
Installer.msi
AFile.txt
It works fine if run from a regular folder that contains the Installer + loose file.
But if its from a Zipped folder (Archive.zip), Windows quietly unzips to a Temp folder before running the .msi installer. The installer then can't find the loose files its looking for because its being run from some random place in the Temp folder. I get an error:
Source file not found:
C:\Users\testing\AppData\Local\Temp\Temp1_Archive.zip\AFile.txt
Is there any way of building an Installer that can determine where its been unpacked to? Or somehow say the loose file is in the same folder as the .msi?

installshield launch exe from source media

I have an installshield msi project that produces CD-ROM files.
I know how to set a custom action in order to launch an exe file stored in binary table.
What i want to do is to launch an exe file that is at the source media root directory and it is not copied at the installation directory.
I do not want to add it at the binary table because i want to be able to change the file without building again the installer.
any ideas?
Thanks
For first time installation, you can reference a property that indicates the location of the installation files. Common ones to consider include:
SETUPEXEDIR
SOURCEDIR
OriginalDatabase - watch out for the .msi filename being included here.
For InstallScript installations (instead of Windows Installer based ones), there is also PACKAGE_LOCATION.

Cannot add folders and files to Windows Installer package

I' m using Visual Studio to create windows installer package, i can't add the folders and data files needed for the application. I create the folders needed for the application in the 'application folder'(under 'File System on Target Machine'), then add files into the appropriate folders, and when i install the application and go to the installation folder there are no folders...there is only the application exe file, hm...
Ooops, i forgot to put the files in the folders actually, that was the problem, so if the folder is empty it is not created in the installer package.

Resources