VLC Player has minor bug using with Sysprep's CopyProfile setting
Using Sysprep's CopyProfile in an Unattend.xml file will result in a minor error.
The problem is that Sysprep's CopyProfile copies the VLC settings file, which contains a hard-coded path to the first user's roaming profile.
For reference, I am using Windows 7 Enterprise and Windows 8.1 Enterprise with the latest version of VLC media player.
Steps to Reproduce
- Install Windows 7 or Windows 8.1.
- When the setup process prompts for the username, enter Sysprep's Audit Mode by pressing SHIFT+CTRL+F3. You will be logged-in with the built-in Administrator account at this point.
- Install VLC media player.
- Run VLC media player.
- Close VLC media player.
- Create a Sysprep unattend.xml file that has the CopyProfile setting set to true.
- Use Sysprep to generalize the image using the unattend.xml file created in the previous step.
- Once the machine restarts, let it go through the normal Windows setup process.
- Login to Windows using a user account other than the built-in Administrator account. The account can have either User or Administrator privileges.
- Open VLC media player.
- Click "Media."
- Click "Open File."
- At this point, assuming that you have UAC enabled, you should receive a message indicating that the folder that it is attempting to access is inaccessible. It is attempting to browse to the Administrator account.
Location of Settings File
The following is the location of the file that causes this issue:
%AppData%\vlc\vlc-qt-interface.ini
The line within the settings file that causes the issue is as follows: filedialog-path=
Why It Is An Issue
This is an issue in enterprises that use CopyProfile to set default settings for all users. CopyProfile is the official, Microsoft-supported method of copying the default profiles. In fact, it is the only method Microsoft supports for creating default profiles.
Potential Fixes
-
An easy potential fix could be to simply refer to the %AppData% variable rather than hard-coding the user's path.
-
Another fix could be for the VLC media player program to detect if "C:\Users\Administrator" is contained within the filedialog-path setting and replace it with the %USERPROFILE% variable. This would work in almost all circumstances because (a) the Administrator account is used primarily for Sysprep, (b) Microsoft no longer supports the use of the built-in Administrator account for regular use, so users should not be using that account any way, and (c) it would not break anything even for users who insist on using the Administrator account for regular use.
Workaround
Until this is fixed, a workaround is to simply delete the path associated with the filedialog-path setting. This must be done right before the image is generalized using Sysprep. Even though this will technically work, it would be better to fix the issue long-term because many Administrators cannot check every single program that they load for these sorts of problems.