I created Visual Studio 2005 Setup project for my application. Windows Installer during installation put one xml file into AppData/myCustomFolder. I used File System Editor and added special folder - user's app data folder, then included that xml there.
When I uninstall application from Control Panel folder from Program Files is deleted, but also my xml file from AppData is deleted too. I need to leave this xml file in the AppData always, even when user re-install application.
How I could do it?
Set the Permanent property to True
Permanent Property
Related
I already had trouble finding out where appSettings get stored when the app is installed in program files directory.
Now the next thing is finding out how to make the app installer update that location too. Because obviously, Microsoft Windows doesn't do it.
When the app is installed in program files and you try to update its settings file the setting file actually got saved to another location: C:\Users\user\AppData\Local\VirtualStore\Program Files (x86)\company\app
How to make Visual Studio Installer remove this file during installation?
I have Visual Studio 2017 which was installed from the web.
Meanwhile, the corporate firewall rules changed and it's no longer possible to update the installation (download.visualstudio.microsoft.com is blocked).
At home I was able to download a complete Visual Studio 2017 layout to an external drive.
Now, how can I instruct Visual Studio Installer to use the external drive layout instead of trying to download from the web?
After googling a bit, I found some clues here and there, but never got a direct answer. I had to do some experiments until I found a very simple solution:
Open folder C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances (or equivalent in your machine). This folder should contain a subfolder with the VS2017 instance GUID (from now on referred to as VS_GUID). Note: ProgramData is a hidden folder.
(Optional) Create a backup of file C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\{VS_GUID}\state.json in another directory of your choice.
Edit file C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\{VS_GUID}\state.json (note: VS_GUID is the sub-folder name found in step 1)
and change layoutPath to your local layout folder and installChannelUri to the full path to ChannelManifest.json (which should be present in the layout folder root).
Example (when layout path is D:\vs2017layout):
(...)
"layoutPath":"D:\\vs2017layout",
"installChannelUri":"D:\\vs2017layout\\ChannelManifest.json"
(...)
Save state.json and launch vs_professional_xxxxxxxxx.yyyyyyyy.exe (or equivalent) which is located in the layout folder. If it detects the updated installation files then the "download" progress should move to 100%.
This worked for me.
In my windows application, there's a file (option.xml) created by my application on the user's computer. It's created run-time with option selected by the user.
This file is in the bin directory.
When I make a new release, the installation (that I make publishing to a shared directory with visual studio wizard) delete this configuration file, so the user have to save the option again.
How can I publish a new release without delete this file?
I'm using visual studio 2013
I hope that the issue is clear.
thanks
I have created a visual studio setup project that writes content files to User's Application Data Folder
C:\users\user\AppData\Roaming\CompanyName
I did this By adding User's Application Data Folder in File System on Target Machine link from setup project and adding content files to that folder.
When I install this setup it installs only for one user(active). I want this to install content files to all users AppData folders
Example folder locations:
1.C:\users\user1\AppData\Roaming\CompanyName
2.C:\users\user2\AppData\Roaming\CompanyName
How to install these content files to each and every user's AppData folder on the machine using Visual Studio Setup project.
Any help is greatly appreciated.
The short answer is that you can't. There's no way of enumerating all those folders and installing files to them, and that won't work anyway if a user account gets created after your setup has been installed.
The good news is that it should just work. Assuming your installed app has a shortcut to the program, and the setup was installed for Everyone, log on as another user and use the shortcut. What should happen is that Windows will notice that the user doesn't have the files and it will ask for the original MSI file to install them. This works even if the user account wasn't present at the time of the install, and will happen just once per new user of the app to install the files.
I have the following problem:
When I create a new project in Visual Studio, name it and hit enter I get the following dialog box:
Access to the path "C:\Users\Tamas\AppData\Temp\lyy03tab.2ey\Temp\Properties\AssemblyInfo.cs" is denied.
I haved changed the default location of the visual studio project, runed VS as administrator but still no result. When I navigate to the AssemblyInfo.cs file it is showed greyed out (like when you cut it). The permision set that are granted for the System,Administrators and my user are all but special permisions.
Can someone help ???
Thanks,
Tamash
Check if you can manually create a folder in Temp. You may want to have a look at the below links. Helpful links:
Unable to create C# Console or C# WinForm app projects in VS2008
The project file could not be loaded. Access to the path "path" is denied
MSDN: /ResetSkipPkgs (devenv.exe)
Else Try deleting the content in Temp directory. Try disabling antivirus if installed.
I have seen this in the past where a virus may have marked a folder or file as "Hidden". Check to be sure that all folders are not hidden and that all files are not hidden. You can do this by right clicking and going into that folder's or file's Properties.