Cannot add folders and files to Windows Installer package - windows

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.

Related

How to delete installation directory when program is uninstalled by visual studio installer project?

I have created an installer using visual studio 2010 installer project. The program installs correctly and works fine for all the features.
But the problem is in uninstallation, when I uninstall the program it does not delete the application directory from file system but deletes the contents of it.
Suppose I am installing the program in C:\Program Files\MyApp, it deletes the contents of MyApp folder but doesn't delete the folder it self.
Any way to do this? If there is a way then how to do this?
Does your application create files in this directory after it's been installed? If so, you might want your app to move that user-data to a more user-data-centric location like %PROGRAMDATA% so that application files and user-data are separated.
It also helps to make sure uninstall cleans up everything, and it's easier to persist user-data across upgrades.
Relevant thread - http://www.itninja.com/question/delete-folders-after-uninstall

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.

How to install files to the Mydocuments folder using Set up project in vs2010

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

Resources