"Cannot create a file when that file already exists." error - windows

I am using Advanced Installer Enterprise and my requirement is to build an installer that downloads/installs an .exe setup file from remote location.
I followed these steps:
Create a project using Enterprise template.
Create a Featured-Based package using New URL Prerequisite (with correct Display Name, URL, and Silent install parameter /SILENT).
But whenever I run my new installer, I get the follow error (see image below) when it finish downloading my .exe setup file from remote location.
Is this an Advanced Installer error or is this an error from my OS?
I am using Windows 7 with Advanced Installer 11.8.

This is not an error from Advanced Installer, it is a generic error from the OS. Not sure why you are receiving it, if you search Google you'll find all kind of cases.
To help you more you can post a verbose log (link it from pastebin) or send it by email at support at advancedinstaller dot com if it contains confidential info.
If you'll send it by email you might as well include the project file from Advanced Installer, to compare it against the log.

Related

The operation could not be completed. Error loading type library/dll .Net

I have a xaml C# project which is a windows .exe application. I want to create a setup file for the same so that I can install it on other machine. I have followed this link to create MSI setup. Creating installer setup
From the above link when I am on Step 4 under (Procedure to create Setup file:) it throws error "The operation could not be completed. Error loading type library/dll". Infact if I try to add or delete any thing from section File System on Target machine, it throws same error. I am using VS 2015
if anybody faced same error Please help.
Deployment Tools: Quick review of MSI tools (free and commercial) - see if there is one to better match your needs and requirements.
Deployment: To solve the application problem, please find some links below. IT might be something as simple as an error in your configuration file or a lacking runtime.
Tools for dependency scan / deployment debugging (find what files should be deployed)
Application launch debugging
Further Links:
Deployment link collection

Why app installed using MSI installer would disappear from Windows

We made some changes to the installation and updating process of our Windows app recently, and some users are now complaining that Windows sometimes automatically deletes the main application .exe file.
It usually occurs after users update app using built-in web update feature. The feature is implemented using .msi built in Advanced Installer tool.
We are struggling to figure out what is causing this, and haven't found a way to consistently reproduce the issue (though we've seen it happen as well).
Here's what changed with our installation and web updating process:
The main installer for our application is now a standard .msi, which becomes a part of the Windows installation system and is natively manageable by Group Policy and other system features, such as rollback or versions. In previous versions that did not have this problem, our installer was a .exe built with the SetupBuilder tool.
We introduced the redesigned web updater feature inside the app (to update to new versions within the app). It uses the same .msi as the main deliverable as for installation. .msi is downloaded from our server in a form of .exe which is then extracts MSI and starts it. MSI then updates file in our installation. These .exe and .msi is built with Advanced Installer tool which provides such a web update feature to developers. In previous versions that did not have this problem, our web update feature was developed with SetupBuilder tool which provided a custom web update files - .exe web updater that downloads a number of web update files containing patch to our app.
The goal of a transition to the standard .msi installer was to make it easy for our clients to deploy the app in organizations - say, mass deploy using group policies and other similar tools.
Has anyone else experienced a problem like this? Any ideas on how to troubleshoot and try to reproduce?
Theory: Before doing anything else: The first thing I would ask the people who report the problem is if they have re-packaged your older, legacy (non-MSI) setup to be their own MSI file? This can cause a well-known upgrade problem along the lines of what you explain (file missing). Please check first. Tell them to uninstall the existing version and then install the new one - that is the simplest way. Not always enough (some obscure problems possible).
Mismatched component GUIDs could cause missing files after upgrade, as could file version downgrade scenarios and various other technicalities. You could try to install to a new default location on disk to avoid these problems. The reason this can work is very technical and hard to explain tersely. Essentially you de-couple yourself from "the sins of the past". It is generally enough to change the name of the file in question: for example MyApp.exe to MyAppNew.exe or maybe add the major version: MyApp5.exe, but maybe try the folder change first ProgramFiles\MyCompany\MyApp => ProgramFiles\MyCompany\MyApp5.
How do you configure your upgrade? View "Upgrades", what is selected: "Uninstall old version first and then install new version" or "Install new version first and then uninstall old version".
Blog Entry:: Why Windows Installer removes files during a major upgrade if they go backwards in version numbers (might be of help).
Deployment Debugging: For open ended debugging of MSI and deployment problems in general one obviously needs to gather intel and that means logging and system inspection.
Logging: First try to get a proper log file for the systems where this problem occurs. In Advanced Installer you can tick the "Enable verbose logging" in the Install Parameters view to enable verbose logging for all package installations. This adds the MsiLogging property to the compiled MSI and every installation of the MSI will cause a MSI log file with a random name to be created in the TMP folder. View the folder, sort by date and the file should be at the top. Suggest you do this and then tell the users to send you the log files when relevant. Maybe you have this setting enabled already?
Further Logging: There are many ways to enable logging, and you can find a description here: Enable installation logs for MSI installer without any command line arguments. The MsiLogging property is just one possibility.
To log a single MSI setup: http://www.installsite.org/pages/en/msifaq/a/1022.htm.
To enable global logging for all MSI operations on the machine: Please see this FAQ-entry from installsite.org, section "Globally for all setups on a machine" - for the exact procedure.
How to interpret an MSI Log File.

SAP B1 Studio Addon installation and Registration

I have created SAP add-on Project in B1 Studio. I was trying to create the installation file for this. But I am facing many difficulties while doing it as I have not done this before and I am unable to find proper documentation for so.
I followed following steps to create one.
Created add-on using add-on installer.
In add on registration wizard I gave address of the newly created .exe file.
I created one more folder and pasted all these file in that along with my project's .exe file and interlop dll.
In sap I registered the add-on and tried to install it.
But it is giving me no executable file found error.
If you are using SAP 9.0 or above, you can create an extension package. Go to the SAP installation directory and find the ExtensionPackage.exe
Path can be something like this
C:\Program Files (x86)\SAP\SAP Business One SDK\Tools\ExtensionPackage
Run this application and enter all mandatory fileds in Basic
information
select the 32 bit version / 64 bit version of your application
select additional files if needed.
mark to register 32/64 bit dlls if needed
click package button to save it.
Now you can go to your SAP Business one and open Administration > Add-ons > Add-On administration
click the Manage Extensions for Lightweight Deployment [this should open the control center in a web browser]
login using your B1site user ID n pass which will take you to extension manager.
Use import to import the package you created
Use Comany Assignment to assign to the correct SAP comapany.
Login to the SAP company to install the extension.

Custom Installer package using NSIS

I have an installer where all the database, server, connection and authentication information is collected at the end of the installation.
Now I want to give an option to the user to create a custom install package at the end of installation with all the database, server, connection and authentication information pre-configured.
So that when the custom install package is run for the next time,all the information previously entered is retained and the installation should complete without having the user to enter the configurations again.
I guess you could store the information in a .ini file that the installer reads from if it is in the same directory as the installer ($ExeDir).
It is also possible to append data to the end of the installer .exe and read it back later but you would have to make a copy of the .exe because you cannot write to it while it is running.

MSI Patch Creation Problems

A new version of our product (a software package) has been released recently. To expand functionality, we developed a plugin afterwards. Now we would like to deploy these files (two new files and an updated version of an existing file) as hotfix (or update) with MSI patch (msp). I downloaded a blank PCP file from MSDN website and made some changes in it. The changes involve the following tables:
ImageFamilies
PatchMetadata
PatchSequence
Properties
TargetImages
UpgradedImages
All the other tables remain blank.
Then, I managed to create an msp file with this PCP file based on two versions of the admin image of the software package, both of which were built from Visual Studio setup project (VS 2010). The difference between these two msi packages are that I replaced a file and added two new files in, but nothing else. I didn't change the product code (GUID), the upgrade code (GUID), nor the version number.
Then I was trying to install this msp file on top of the released version.
The first screen appearing is asking to Repair or Remove the product. This is not what we want. We want the installer is like a fresh installation, including showing the licence agreement. How do I define the UI for MSI patch?
During the installation of the patch, I got an error message as below, then the installation failed:
Error 1001. Exception occurred while initializing the installation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\WINDOWS\system32\Files\BPS\TestApp' or one of its dependencies. This system cannot find the file specified.
BPS is the folder where we install our product in [ProgramFilesFolder]. I wondered why MSI was trying to search in "C:\Windows\system32" for files installed in [ProgramFilesFolder]. In addition, the changed files in the hotfix are located in somewhere else ([CommonAppDataFolder]) instead of in this "BPS" folder.
Can anyone help me with these problems? If any more information is needed to identify the issues, please let me know. Any thoughts, advices, suggestions would be very much appreciated.
Dan
The first screen appearing is asking
to Repair or Remove the product. This
is not what we want.
In the upgrade package increase the Product Version. This way you will use a minor upgrade instead of a small update.
You can also try using the MSIEXEC command line to apply the patch:
http://msdn.microsoft.com/en-us/library/aa367574(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367575(VS.85).aspx
During the installation of the patch,
I got an error message as below, then
the installation failed
Is there something in your installer using that file? Perhaps a custom action? Try looking in the log to see what action tries to access that file.

Resources