I have an installer project (Visual Studio Setup Project) that has a desktop and start menu link to the project output. Both of these shortcuts link to the same output assembly.
When I try to perform an uninstall I get the following error:
Warning 1910.Could not remove Shortcut Bing Background.lnk. Verify that the shortcut file exists and that you can access it.
Any idea what is causing this and how to fix it?
If you have Visual Studio open, go to Tools > Get Tools and Features... which opens the Visual Studio Installer. Or, open the Visual Studio Installer from the Start menu. From there, you can choose the workloads or components that you wish to install.
Start Visual Studio ( devenv.exe ) with /Log parameter. You can press Start+R and then enter the command below for Visual Studio 2019 Enterprise. Change the path to devenv.exe depending on the actual Visual Studio version. The log file will be found in %AppData%\Microsoft\VisualStudio\ , under a subdirectory (*).
Indeed, the read-only attribute seems to be reproducing this problem constantly (multiple tests executed on Win Vista & 7). For those of you interested, I made a small DLL that checks for the attribute, and removes it if present. You can find it attached to this thread post (page 2). You can use the DLL in packages created with any tool you have, as long as it builds an MSI based setup.
I would guess, can't say for sure, that Windows Installer modifies this INI file, for example if the shortcut that gets removed was customized by the user after it was installed.
I made a some tests, created a package that installs a desktop shortcut and run it, during the uninstall and install I can see that msiexec.exe constantly accesses the "desktop.ini". Then I removed the shortcut from the package and cleared the log from Process Monitor, followed by a new install and uninstall process. I could not find any trace of msiexec.exe accessing desktop.ini anymore.
I didn't had too much time to search docs about the reasons why Windows Installer access this file, but while I searched I could not find anything. Most likely our friends from Microsoft didn't published nothing official about this, considering that the attributes of this file must be untouched.
See this thread: Warning deleting shortcuts in Windows 8
The investigation is still in progress but I wanted to share some information. It appears that repro machines that have a desktop.ini with read-only attribute set on it results in the message on uninstall appearing. If the read-only attribute is removed the message wont appear. For a per-machine installed package the desktop.ini of interest would be located here: :\Users\Public\Public Desktop. Feel free to share your feedback on this and I will post again as I have information to share.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With