Installshield : How to preserve files after uninstallation - installshield-2011

I am using installshield 11 to create Basic MSI Project. My requirment is, when i unstall the project, i want to preserve certain files.( I don't want these Certain files to be removed when unstallation takes place ). Morover, these files are not a part of the component, but they are created(copied) during installation process by using copyfile (script) command from specific location.
-Dev

Use Disable(LOGGING)....Enable(LOGGING). Using CopyFile() in-between these methods will prevent uninstall removing the files

Windows installer removes only those files and folders which it installs. That is each file present in it's database in File table and Folder table. It do not remove any file which does not have entry in File table, similar for folder.
Also, If folder is not empty then that folder does not get deleted during uninstall.
If your installing some files using Copyfile script ( may be using any custom action) then those files will not be removed during uninstall.

Thanks Balachandra for your response, But i have below observation which might help.
Files which i want to preserve is created by CopyFile, and target dir which i mention in the copyfile command does not exist. So CopyFile creates the folder and copy the file to that folder. So obviosly we will not have this folder entry in the dir table of installsheild
But this approach does not help, uninstallation is removing all copied files from this folder.
-Dev

Thanks, Alerter, I've been fighting this one for 2 days.
We install an example configuration file and create a copy of it (on first installation). We needed to preserve the configuration file if the customer changed it, but the file was always getting deleted on uninstall. Disabling the LOGGING around the CopyFile command was exactly the solution for this situation.
Dev, I know this is an old post, but you should accept this as the correct answer.
Hopefully this phrase will help others find this solution easier through the search engines: Installshield file created with CopyFile is always deleted during uninstall

Related

Where do some sublime packages and default settings go?

Sometimes I install a new sublime package and a new directory gets added to the /Users/max/Library/Application Support/Sublime Text 3/Packages directory, which I like because I can use a bookmark with FuzzyFileNav and quickly browse the default .sublime-settings and .sublime-key files to get my bearings about what is going on with this package. However sometimes there is no entry added, as shown below (ironically with FuzzyFileNav)
So then the way I would find the .sublime-settings and .sublime-keymap files is to use the dropdown menu in sublime also shown below:
What I'm wondering is:
Why do some packages add entries to my Packages directory and other don't?
If there is no entry in Packages then where do the package specific .sublime-settings and .sublime-keymap files live?
My main goal is to be able to quickly navigate between my User and Default settings but it makes it hard when I'm feeling like Hansel and wondering where'd all the files go...you know :)
One workaround that might work is to copy all the Default .sublime-settings and .sublime-keymap files that don't live in the Packages directory and put them in the User directory and rename them to PackageName.sublime-settings and PackageName.sublime-keymap and then I'll be able to browse them anyways because I also have a bookmark to User. I think that would work because it would overwrite all the Default settings (that live somewhere) with all the exact same settings. Or maybe I could do that same thing except put the files in the Default directory; however, from what I've been reading it's bad form to modify the Default directory. Obviously the most ideal thing would be to just figure out where the heck these files are.
Sublime Text uses different folder locations for different kinds of packages. For instance, all packaged files install to Installed Packages and are self-contained in a standard Zip file using the file extension .sublime-package. When a package includes a file .no-sublime-package, the package will be extracted. All extracted packages are stored in the Packages folder.
Settings and keymaps are stored within both packed and unpacked packages. Those can be overruled/extended by saving them to Packages/User.
Detailed information on package locations and hierarchy can be found in the Package Control documentation.
idleberg's answer contains a good explanation of why you were unable to find .sublime-package files & unpackaged files in the same location.
The following information details an alternative method you can use to navigate all package files, whether packed or unpacked.
All of SublimeTexst's installed package files can be navigated and edited via PackageResourceViewer's PackageResourceViewer: Open Resource command.
Any files that are edited from a .sublime-package file will have a new instance created at Packages/PackageName. The new file will now override the original file ( which still exists in the .sublime-package file ). The original file can be reactivated by deleting the edited file.
Files edited from an unpacked package will be affected directly.
If both packaged & unpackaged instances of a file exist, PackageResourceViewer will open the unpackaged instance.

Check that no file is forgotten for the installshield project

we actually build an InstallShield project for our application with the functionality to include files dynamic into a component. All files will be taken which are in a specific place.
Because of problems, which are not part of this question, we want to change this to components where we add files explicit to custom separated components.
The question is, is there a best practice for this? We have the small fear that we easily can forget to add files to the component we new created. These can be dll files, .config files, pdfs or just xml.
(We build the installer every night using TFS.)
We found a solution for the problem.
What we wanted to solve:
During the build we want to be informed if files got removed
During the build we want to be informed if new files are missing
we solved this by two more or less easy things.
1. Information if a file is removed
This is easy sone, we have all files added explicitly, each single file is an own component now, if one file is missing the whole project does not build with the exact error message.
2. Information for missing files
For this we wrote a small tool which runs by a prebuild event of the installshield project.
There it opens the *.ism file as an xml file and searches for the "Files" table.
Than it takes all files from the drop folder and looks if all files are in there.
If there are files missing but we don't expect them, like pdb files or test dlls, we have an additional text file we just called "IgnoreList".
The tool skips these files by the check.
Now we are on a very good state to get informed directly on the next morning if the project was able to build or not, and if not what happened, so we can be sure that in the final target application are files are there :-)

How to Get specific version of solution when there are multiple solution?

I have multiple solutions in a folder. For example
C:\Code
-Solution1.sln
-Solution2.sln
-Solution3.sln
-[All other project files/folders belongs to above solution, etc]
Note that having these solutions in separate folders is not an option for me.
Assume if I open a one solution in VS2012 (i.e Solution1.sln). I right click on the solution
and select Source Control -> Get Specific Version...
Select Type "Latest Version", and tick two check boxes
a. Overwrite writable files that are not checked out
b. Overwrite all files even if the local version matches
And then press the "Get" button.
The problem is that this operation gets the all the latest files for the c:\Code folder - even the ones that are not belongs to my current opened solution (Solution1.sln). It replaces the files for Solution2 and Solution3.
Is there a way I can configure TFS only to get Solution1 file?
I'm using TFS2012
Update: Please see the sample structure below.
Okay. You have to move all your solution files to a solution folder will solve your problem. TFS is trying to get all the files from the solution folder and its sub folder. That's why you having this issue. Create a folder called Solution, you can create it inside the code folder or outside. Open your solution1 file in vs2012 and select the solution file and choose File -> Save Solution1.sln as and save it in the solutions directory. Repeat the same for all the solution files.
Once you are happy with the new solution files from the solutions directory, delete the old solutions files form the code directory.
Browse to your solution in Source Control Explorer, select "Get Specific Version" from the Advanced menu: it should work fine.

Create a setup.exe file without any dependent files

I am a first time user of this group and so pardon me for any mistakes and unclear statements.
What I am trying to do is to create single setup.exe (not msi) using installshield. But when I build the project what I get is other files along with the .exe file for e.g. .cab, .hdr, .inx and other such files.
I am using the options under Release -> Release Wizard -> General options-> Checked the "Create a single file executable" & "Compress compiled script" options but still I get the extra files along with the setup.exe file. I want a setup.exe file to be created independent of the other local files.
So could anyone suggest me how to achieve that.
Any help will be appriciated.
Thanks.
As Michael Urman wrote, you will find the one file in adjacent folder.
The folder name is "Package".
Those files are always created for InstallScript projects. When you build a single file executable, the single file version that packages it all together is available in an adjacent folder.

Retain files after Uninstallation

Certains files i am copying from one dir to another dir by using CopyFile command in Installshield 11 Premium. I want to preserve copied files even after uninstallation of product. What are the ways to do so?
-Dev
Use Disable(LOGGING)....Enable(LOGGING). Put your copy function between this.
This way, the copy action will not be captured in the log and will not be deleted.

Resources