Msi Install issue on windows 7 - windows

I have crated Msi Installer using visual studio setup and Install project.My set up is working fine on some machine but on it works fine only when I am installing that set up using command prompt with admin privilege else installer completed but I am not able to see any file in programme file. So what can be issue?

I think Visual Studio generated MSIs behave badly when they require admin privilege but you don't use it. I think you'll find they install all the files to C:\ somewhere. The essential question is not if the files are there, oddly enough, but whether you see an entry in Add/Remove Programs (Programs&Features) because that means the install succeeded, because you don't mention an error the install rolling back. I think you are saying that there is an entry there.
Did you mark the install as for Everyone or Just me? That seems to make a difference, and I suspect you have a Just me install, which still means that you need admin privilege if you install to restricted locations. The Just me install does not mean a limited user can write to restricted parts of the system.

Related

Visual Studio 2015 Update 3 installation failed

I have a problem with installation Visual Studio Professional 2015 Update 3. I don't know what cause the problem, but setup is failed every time in each setup configuration. Setup manager shows me following error and warning:
Microsoft Visual Studio Services Hub
The system cannot open the device or file specified
I really don't know how to solve this problem. Does anyone know what is wrong and how can I install this program?
Greetings
SOLUTION
I know what was the problem! I didn't check thoroughly the default location where Visual Studio wants to install. On my PC I have installed a 64-bit Windows 7. After many tries of installation I saw that installator chose wrong Program Files folder. It tries to install Visual Studio in Program Files (x86) (dedicated for 32-bit programs). I really don't know why VS installator chose a default folder for a 32-bit programs while my VS is a 64-bit version and also Windows is a 64-bit version.
I hope that this solution will help someone who has the same problem.
Most likely this is because of Windows Installer cannot access the %TEMP% folder (I had similar error once, but with MSSQL setup). So:
First of all check if you %TEMP% environment variable points to the
right location
Then check if the account which is running VS setup has privileges to
access TEMP folder. Better yet, make sure you run setup as
administrator
Finally make sure you have disabled all disk or folder encryption
features
Also just to be sure disable any antivirus software you have running
The error message “The system cannot open the device or file specified” often related to the specific folder is encrypted, you can have a look at this article and try the following methods:
Save the VS installer file to a folder that is not encrypted
Install the VS to a folder that is not encrypted
Turn off encryption on the %temp% folder
To check the encryption of the specific folder, you can right click the folder and select ‘Properties’— ‘General’ tab, click ‘Advanced’ button and confirm the checkbox of ‘Encrypt contents to secure data’ is checked or not.
You can click the ‘log file’ in the VS installer screen that you shared, and find the specific folders that these 2 components ‘Microsoft Visual Studio Services Hub’ and ‘Visual C++ IDE Common Package’ stores and check if those folders are encrypted or not.

Visual Studio Installer - The system cannot find the file specified

Whenever I try to launch the Visual Studio 2015 installer, I immediately get the following error message:
I've tried redownloading the installer, but for the life of me I can't seem to get it to install. Would anybody know how to fix this?
My first suggestion would be to try and create a new user, download the installer again and see if it works;
As mentioned in the comments, Process Monitor may help diagnose your problem;
Your antivirus may consider the installer a false positive, so you may want to temporary disable it before you download the installer again;
Make sure your installer is the real one. Here is the link for the Community version;
There is also the possibility that the disk is failing. Try running chkdsk on your drive.
EDIT:
The problem seemed to be about the web installer, try grabbing the vs2015.com_enu.iso file available here.
In my case, it was that the user temp directory was inacessible due to a disk issue (my temp dir was on a small dedicated SSD disk).
Without access to temp dir, VS crashes on startup and installers won't run.
I had to change my temp dir (from environment variables) and VS started again.

WIX: Prevent removing pre-existing files during uninstall

The WIX installer I'm writing needs to install several operating system files in system folder. The program I'm writing this installer for is an old program... probably 10 years. I don't want it to replace any preexisting OS files on the user's machine. To resolve this, I figured I could use "NeverOverwrite="yes"
My problem is during the uninstall. I want the installer to ONLY uninstall the files it added. I don't want it to uninstall any pre-exisitng OS files the user already had.
Thank you
The installer should not delete files that it did not install (as Natalie commented), unless you specifically tell it to.
That said, when I need to install files directly to the system folder, I mark them as permanent so they never get uninstalled. Usually it's a Mircrosoft control or some OS file for which I don't have a separate redistributable installer, but if I had I wouldn't uninstall anyway.

How do I install a visual studio 2010-built .exe to a specific folder?

I've written a program that needs to be installed a on an external network. The end-user is a sys admin who needs to install the program in a specific location on a server.
I've fiddled with the options in the publish menu a little bit, but can't find out how to specify where the program should install to. I've also tried running setup.exe with an install location as a parameter, as suggested in the link from Microsoft, but this command does not seem to work. (I've tried both with and without the URL prefix)
http://msdn.microsoft.com/en-us/library/bb608626.aspx
Also, I considered putting this on Server Fault but I'm assuming there is some easy way to configure the install location in visual studio, I just don't know about it.
Any ideas?

WIX uninstall error

Whenever I try to uninstall my WIX installation via Add/Remove Programs or the uninstall shortcut I put down with the installation, I keep getting the following error:
a network error occurred while attempting to read from the file c:\windows\installer\MyProduct.msi
But if I use the original installer and select uninstall then it is fine. Why is this happening as obviously you can't expect customers to hang onto the original installer if they need to uninstall my product!
After some testing it seems that if I install then uninstall straight away then it is fine, but if I log off or restart the computer then I get the error.
Update: Once an install is finished I run a custom action to delete a folder which temporarily holds some database files used during the install. After digging around it seems that the uninstall is trying to access these files, why would it be doing that, it has nothing to do with uninstallation?
"C:\Windows\Installer" folder is the Windows Installer cache. It's used to store MSI packages for installed products. These packages are used by Windows Installer when performing a repair or modify operation on the product.
In your case the uninstall process needs some files which are missing. The MSI in Windows Installer cache is not complete (it's just a stripped down version), so you are prompted for the original package.
Usually this behavior is triggered by custom actions which try to use files that are not available during uninstall. Try creating an uninstall log to see what triggers this.

Resources