Automate VLC Deployment with ConfigMgr

Create your Folder Structure:

Download VLC:

Scripts & Files available here:

Create your Install & Uninstall Scripts:

Load_VLC.cmd Script:

REM Unininstall Old Versions:
if exist "%PROGRAMFILES%\VideoLAN\VLC\uninstall.exe" "%PROGRAMFILES%\VideoLAN\VLC\uninstall.exe" /S
if exist "%PROGRAMFILES(x86)%\VideoLAN\VLC\uninstall.exe" "%PROGRAMFILES% (x86)\VideoLAN\VLC\uninstall.exe" /S

REM Killing time to ensure the uninstall is completed.
PING -n 1 -w 6000 >NUL

REM Using FOR Loop to find any EXE file and run it with these arguments (So you don't have to change the script for each new version)
for %%i in (*.exe) do cmd /c %%i /S /L=1033 --no-qt-privacy-ask --no-qt-updates-notif

REM Making Directory can copying config files to disable updates.
copy vlc-qt-interface.ini %ALLUSERSPROFILE%\VLC /Y

mkdir "C:\ProgramData\vlc"
XCOPY vlcrc "C:\ProgramData\vlc" /E /V /H /Y
XCOPY vlc-qt-interface.ini "C:\ProgramData\vlc" /E /V /H /Y

REM Copy Shortcut to Start Menu Root
XCOPY "VLC Media Player.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\" /E /V /H /Y

REM Delete Start Menu Folder & Desktop Icon (x86 & x64)
RMDIR "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN" /S /Q
DEL "C:\Users\Public\Desktop\VLC media player.lnk" /S



Note, in most of my scripts, I use this line instead of the actual installer name “for %%i in (*.exe) do cmd /c %%I” – This way, each time the installer is updated, I don’t need to change the script, just copy the folder contents and replace the installer file.


Uninstall Script (Uninstall_VLC.cmd)

REM Unininstall Old Versions:
"%programfiles%\VideoLAN\VLC\uninstall.exe" /S /NCRC
"%PROGRAMFILES(X86)%\VideoLAN\VLC\uninstall.exe" /S /NCRC

REM Killing time to ensure the uninstall is completed.
PING -n 1 -w 6000 >NUL

REM - This is a powershell script that runs the following Command, which will delete user's VLC Data if they have it, so it pulls in the one created in this install.
REM - Get-ChildItem C:\Users\*\AppData\Roaming\VLC -Recurse | Remove-Item -Recurse

REM Killing time to ensure the the Last Process is complete
PING -n 1 -w 6000 >NUL


REM Copy Shortcut to Start Menu Root
DEL "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VLC Media Player.lnk" /Q /S

REM Delete Start Menu Folder & Desktop Icon
RMDIR "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN" /S /Q
DEL "C:\Users\Public\Desktop\VLC media player.lnk" /S
RD /S /Q  "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLan\"
del /Q "C:\Users\Public\Desktop\VLC media player.lnk"


I also copied a couple of preference files (in the download available), this is also supposed to disable automatic updates.
For some reason though, when I launch the application, go in to settings, it still shows the updater is active, but I have not seen any prompts.  So it “appears” to be disabled anyway.


Now that we have our Content created, in ConfigMgr
Create an Application



In the Content Tab, make sure it is pointing to your ConfigMgr Content Source.




Note, if you do not have this custom requirement available, see this post:



If I didn’t show a tab, it because there is nothing to set.


I hope you found this useful, look for several others to follow soon, including:
Adobe Air
Notepad ++

And a follow up on how to keep them updated.

Secure Wipe with logging using ConfigMgr Task Sequence

First off, I want to give credit where Due, I first borrowed this idea from Jeremy @ syswow

Then Modified it to give feed back to our Service Desk, and keep a record on the Server
Also changed it from one 1 step to run 7 passes, to having 7 steps run a single pass, so when you look at the TS Progress, you know what pass it is on.
Look back to his blog for more details, as he explains the sdelete command and parameters used.


Overview of TS

  1. Restart to WinPE (x86)
  2. Bios Settings - We have it clear our Bios Password, since they machines will be going recycle
  3. Wipe Drive Section
  4. Copy SDELETE - Copies the Files the "OS" to be used (sdelete.reg, diskpart-clean.txt, and batch file used at end)
        Run Command Line - xcopy.exe ".\*.*" "%WinDir%" /E /C /Q /H /R /Y /I
  5. Accept the EULA - adds registry key to OS Registry
        regedit /s sdelete.reg
        Start in: %WinDir%
  6. Format and Partition Disk - Runs a TS format Step
  7. 7-13 - Runs a Pass of sdelete (Running 7 separate passes so you can label each pass, so the someone watching knows what pass they are on)
        Run Command Line - sdelete.exe -p 1 -c -z
  8. Diskpart - Clean - Removes any Paritions and leaves the drive a blank
        Run Command Line - diskpart -s X:\Windows\diskpart-clean.txt
  9. Map Drive L: - Report Share - This maps a Drive, granting access for the Next Step to save a file on the Network
        Run Command Line - net use l: \\server.fqdn\share$\DiskWipeResults /user:domain\username password
  10. Posts information once Wipe is completed, and saves logs on the Servers
        Run Command Line - x:\Windows\JobComplete.bat
        2 Logs are Modified.  It first will create a log for the indivdual machine, which can be printed and attached to the machine
                                        It then appends to a log showing all computers that have undergone this process

Screen Captures:

Step: Copy SDelete

Step: Accept the EULA

Step Format and Partition Disk

Step: Wipe Disk Pass 1 - 7

Step: DiskPart - Clean

Step: Map Drive l: (requires an account with permissions to the share specified.  Recommend a Service Account that is locked down to only that share, and does not have logon rights)

Step: The HDD has been Wiped Clean

Capture of Process:



Logs on Server:
Creates a DiskWipe-SERIAL.txt file &  Appends to the DiskWipeResults.txt file.



It will then append the next computer, and so on to keep a running log of all.

Files Needed: (Also available in LINK at bottom)

JobComplete.bat file:

Echo off
for /F "skip=2 tokens=2 delims=," %%A in ('wmic systemenclosure get serialnumber /FORMAT:csv') do (set "serial=%%A")
set serial=%serial:~-15%

for /F "skip=2 tokens=2 delims=," %%A in ('wmic csproduct get vendor /FORMAT:csv') do (set "compvendor=%%A")

for /F "skip=2 tokens=2 delims=," %%A in ('wmic csproduct get name /FORMAT:csv') do (set "compname=%%A")

for /F "skip=2 tokens=2 delims=," %%A in ('wmic CPU get name /FORMAT:csv') do (set "CPUname=%%A")

for /F "skip=2 tokens=2 delims=," %%A in ('wmic computersystem get totalphysicalmemory /FORMAT:csv') do (set "memory=%%A")
set /a memory = memory / 1048576

for /F "skip=2 tokens=2 delims=," %%A in ('wmic diskdrive get size /FORMAT:csv') do (set "hddsize=%%A")
set hdd=%hddsize:~0,-4%
set /a hdd=hdd/1048576

set TimeStamp=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%

REM Creates Network Log File
echo. >>l:\DiskWipeResults.txt
echo Date:       %TimeStamp% >>l:\DiskWipeResults.txt
echo Serial:     %serial% >>l:\DiskWipeResults.txt
echo Vendor:     %compvendor% >>l:\DiskWipeResults.txt
echo Model:      %compname% >>l:\DiskWipeResults.txt
echo CPU Type \ Speed:   %CPUname% >>l:\DiskWipeResults.txt
echo Memory:    %Memory%MB >>l:\DiskWipeResults.txt
echo HDD Size:   %hdd%GB >>l:\DiskWipeResults.txt
echo ____________________________________________________________ >>l:\DiskWipeResults.txt

REM Creates Network Label for Machine
echo Vendor:     %compvendor% >>l:\DiskWipe-%serial%.txt
echo Model:      %compname% >>l:\DiskWipe-%serial%.txt
echo Serial:     %serial% >>l:\DiskWipe-%serial%.txt
echo CPU Type \ Speed:   %CPUname% >>l:\DiskWipe-%serial%.txt
echo Memory:    %Memory%MB >>l:\DiskWipe-%serial%.txt
echo HDD Size:   %hdd%GB >>l:\DiskWipe-%serial%.txt
echo. >>l:\DiskWipe-%serial%.txt
echo Asset Tag:  ____________________ >>l:\DiskWipe-%serial%.txt
echo. >>l:\DiskWipe-%serial%.txt
echo DoD 5220.22-M sanitization Wipe using MS SDELETE - 7 Passes >>l:\DiskWipe-%serial%.txt
echo Date Sanitzed: %TimeStamp% >>l:\DiskWipe-%serial%.txt
echo. >>l:\DiskWipe-%serial%.txt
echo. >>l:\DiskWipe-%serial%.txt
echo Sanitized and Verified By:  ______________________________ >>l:\DiskWipe-%serial%.txt

REM Creates Local Log file that displays at end of Process

echo Disk Wipe Complete, Please Record Data for Records >>X:\Windows\JobComplete.txt
echo This computer has finished with a DoD 5220.22-M sanitization of the local hard drive. >>X:\Windows\JobComplete.txt
echo Please close this file and turn off the computer. >>X:\Windows\JobComplete.txt
echo. >>X:\Windows\JobComplete.txt
echo Date:       %TimeStamp% >>X:\Windows\JobComplete.txt
echo Serial:     %serial% >>X:\Windows\JobComplete.txt
echo Vendor:     %compvendor% >>X:\Windows\JobComplete.txt
echo Model:      %compname% >>X:\Windows\JobComplete.txt
echo CPU Type \ Speed:   %CPUname% >>X:\Windows\JobComplete.txt
echo Memory:    %Memory%MB >>X:\Windows\JobComplete.txt
echo HDD Size:   %hdd%GB >>X:\Windows\JobComplete.txt


sdelete.reg file:
Windows Registry Editor Version 5.00


Package Contents (Scripts and Files used):
Sdelete download:

ConfigMgr Report - Software Information by Title by Collection

Files Included in ZIP File (Download HERE:
Documentation (This File)
A Multi Software versions Inventory Report.rdl – MAIN REPORT FILE
SoftwareCountsDetailVersion.rdl – SUPPORT REPORT FILE

Assumptions, you have MS Report Builder installed, you have access to your CM Report Server, and can Save & Modify reports on your CM Report Server, and some knowledge of how Datasets & DataSources work.

This is a Report to Search Specified Collection for Specified Software


Collections List Can Be Modified & Software List Can be modified... More Later. Choose a Collection & Software, then click View Report

 When when you click on a Version or Software Name, you’ll see the computers with software that matches the Software Name or Version Number.




Once you click on the Name or Version, you’ll get forward to another page with those machines

Information includes: PC Name, Software Name, Version, Last Logon Name, Email Address for User, Computer info, and the last time that computer had a CM Hardware Inventory Scan.

To install the reports, once you have saved both of them to your Configuration Manager SSRS, you’ll need to create a new data source in the report and fix the datasets to use the correct data source.

The Main Report uses “SoftwareCountsDetailVersion” (Linked on the “Software Name” & “Versions” Text Box)



 (Linked on both “Software Name” &  “Version_Number” Text Box)


To modify the Available software in the Drop Down List:  Modify the Query in the “SoftwareSelection” Dataset.
These will correspond to the @SoftSelect Parameter which creates the Drop Down list.

To Change the Collections, Modify CollectionDropDown Dataset

Replace the CollectionID numbers with the ones you want (SMS00001 = All Systems)


Please provide any feedback that will help improve this documentation or reports.




Chrysanth WebStory Published by WebStory

Windows 10 Customizations during OSD

UPDATE 3/22/2017 - I'll be revamping nearly all of this with updated scripts and better processes I've learned over the past year of Deploying Windows 10.  I'll be doing it after I present on it at MMS.  If you'd like any tips before then, catch me on Twitter - @gwblok

I will also be providing all of the updated Content for a Package & Exported TS with all of the steps.  All you'll have to do is replace images with your own corporate images and update any Content Locations. - Now Available -


Updated 11/30/2015 – Remove Default Apps Section – Disable New Apps Auto Install in Windows 10 Update 1511
Updated 6/7/2016 - Added more info about Lock Screen Wallpaper replacement.
Update 11/8/2016 – More Lock Screen Info

This is a collection of "Tweaks" I make to our Windows 10 deployments to improve user experience and do branding.  I'll admit upfront that most of these ideas are not original to me, I've borrowed and adapted several things for my own needs.  When possible, I post a link to the blog post that helped me.  I hope you find useful this compilation of Tweaks. (Download of scripts / files used are at bottom)
- Please Note, if you try to copy / paste some scripts from this page, the "quote" marks typically get messed up and would need to be fixed... or just use the scripts in the download

First things, I've got a "OSDWindows10Scripts" package, with several subfolders that I keep all of the customizations in, which I can then reference during OSD.
I'm going to go through them folder by folder to explain which each does and how it's used in the Task Sequence.

DefaultAppAssoc (Change Default Applications for Extensions)
This Customization was developed by Johan
Info taken from:
Currently I used this to set .PDF to Adobe Reader (Instead of Edge) and make Internet Explorer as the Default browser.

In the TS, it looks like this:
Dism.exe /online /Import-DefaultAppAssociations:DefaultAppAssoc\Win10DefaultAppAssoc.xml


Desktop WallPaper (Set the Default WallPaper)
Info taken From:
nothing fancy here, we're just over writing the default Windows Wallpaper image with our own.

cmd.exe /c DesktopWallpaper\Load_DefaultWallPaper.cmd


LockScreen (Sets the LockScreen Image)
Update 6/7/16 - You can also do this via group policy - info HERE
Update 11/8/16 – Using this method below, in 1607 will prevent users from changing it themselves. – Added Second Method that will still allow users to change their Lock Screen Image.

Originally Adapted from:


REM Copy Wallpaper locally
xcopy LockScreen\LockWall.jpg C:\Cabs\LockWallpaper\ /Y /S

REM Import Registry Key to set the background
reg import LockScreen\LockScreenWallpaper.reg
reg import LockScreen\LockScreenWallpaper.reg /reg:64


Registry File:
Windows Registry Editor Version 5.00


As you can see, all that happens is the LockScreen WallPaper is copied local, and a registry setting points to it.

EDIT: 6/7/2016 - Working on new post to cover disabling those Tool Tips in OSD.  Did not have any luck with Group Policy disabling it.
More info:

EDIT: 11/8/2016 Added Method 2
LockScreen Method 2, sets the lock screen you want, but still allows users to change lock screen image in settings


Those two image files that you select, will replace two of the files here: C:\Windows\Web\Screen
img100.jpg is the default, but if you want to add any other corporate branded pictures, you can just add them to your list of files to copy.

Script: – One line per picture: xcopy LockScreen\img100.jpg C:\Windows\Web\Screen\ /Q /Y




MyComputerDesktopIcon (Adds the "My Computer" Icon to the Desktop)

Windows Registry Editor Version 5.00




MyComputerNameIcon (Changes the Name of "My Computer" to the actual name of the PC)
You can see an Example lower down in the "Windows10ExplorerTweaks" Section

This has been handy, so users have an easier time finding their computer names when contacting support, We just tell them to look on their desktop, and the Icon for "My Computer" actually says "Computer Name = %COMPUTERNAME%"
Script File (Load_ComputerName.cmd)
MyComputerNameIcon\setacl.exe -on "HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -ot reg -actn setowner -ownr "n:Administrators"
MyComputerNameIcon\SetACL.exe -on "HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -ot reg -actn ace -ace "n:Administrators;p:full"
MyComputerNameIcon\SetACL.exe -on "HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -ot reg -actn ace -ace "n:SYSTEM;p:full"
reg import MyComputerNameIcon\ComputerName.reg /reg:64

Windows Registry Editor Version 5.00




OneDriveRemoveShellFolder (Removes the OneDrive Folder on the Left Pane in Explorer)
Update 04/21/2016 – Updated Info about OneDrive - New Post here:

Idea adapted from:

I don't actually use these files, but keep them for documentation.



RemoveDefaultApps (Remove MOST of the Win 10 Default Apps, but leaves what we wanted, Calc, Alarms, Weather, Maps)
Adapted from:

Edit 6/7/16 - Found this recently, another great way to do it:

Script: -----



Purpose: Remove built in apps specified in list

Pre-Reqs: Windows 10




# Main Routine


# Get log path. Will log to Task Sequence log folder if the script is running in a Task Sequence

# Otherwise log to \windows\temp



$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment

$logPath = $tsenv.Value("LogPath")




Write-Host "This script is not running in a task sequence"

$logPath = $env:windir + "\temp"


$logFile = "$logPath\$($myInvocation.MyCommand).log"

# Start logging

Start-Transcript $logFile

Write-Host "Logging to $logFile"

# List of Applications that will be removed

$AppsList = "Microsoft.XboxGameCallableUI","Microsoft.XboxIdentityProvider","Windows.ContactSupport","microsoft.windowscommunicationsapps","Microsoft.BingNews","Microsoft.Getstarted","Microsoft.BingFinance","Microsoft.XboxApp","Microsoft.SkypeApp","Microsoft.ZuneVideo","Microsoft.ZuneMusic","Microsoft.WindowsPhone","Microsoft.People","Microsoft.Office.OneNote","Microsoft.MicrosoftSolitaireCollection","Microsoft.MicrosoftOfficeHub","Microsoft.BingSports","Microsoft.3DBuilder","Microsoft.WindowsFeedback"

ForEach ($App in $AppsList){

$Packages = Get-AppxPackage | Where-Object {$_.Name -eq $App}

if ($Packages -ne $null)


Write-Host "Removing Appx Package: $App"

foreach ($Package in $Packages)


Remove-AppxPackage -package $Package.PackageFullName





Write-Host "Unable to find package: $App"


$ProvisionedPackage = Get-AppxProvisionedPackage -online | Where-Object {$_.displayName -eq $App}

if ($ProvisionedPackage -ne $null)


Write-Host "Removing Appx Provisioned Package: $App"

remove-AppxProvisionedPackage -online -packagename $ProvisionedPackage.PackageName




Write-Host "Unable to find provisioned package: $App"



# Stop logging



Disable Microsoft Consumer Experiences (Additional Apps Auto Installed ) Updated 11/30 – More Info:

Registry File: DisableMSConsumerExperiences.reg

Windows Registry Editor Version 5.00






This folder contains Pinned Site Shortcuts to frequently used Websites, or ones I want them to know about.
The Application Catalog, Google (Named Internet Explorer)
I named it Internet Explorer, to use it as an Icon in the Start Menu for IE (As IE is not able to be Pinned in Windows 10)
more info in the next Section.

In the Sample Files, I've changed the Application Catalog to point to MS.  Just Replace it with a Pinned Site Shortcut to your Application Catalog.

I just copy these .website files into the Start Menu.
xcopy StartMenuShortcuts\* "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs" /Q /Y /I



StartScreenTiles (Create Custom Start Menu)

Info taken from:

On your reference Machine, configure the Start Menu how you would like it to be (Note, Internet Explorer 11 will not Stay Pinned to your Start Menu, I've created a Workaround by using an IE pinned Shortcut file called Internet that I copy into the Program Menu during OSD) (Last Section)

Once you've created your Start Menu how you like:

Elevated Powershell
Export-StartLayout -Path "c:\CMSource\StartMenuLayout.bin" (Then Copy that .bin file to your Package)

In my folder structure, I have a couple of different versions, my main one is v2, but if I have to make changes for new applications, I'll add v3.  It's nice to have version controls. (v1 had office 2013 instead of office 2016, so If I deploy a machine with Office 2013, I can use a variable to use v1 startmenu with Office 2013 shortcuts instead)

During OSD, just use a Powershell command to import the Start Menu: powershell.exe Import-StartLayout -LayoutPath StartScreenTiles\v2\StartMenuLayout.bin -MountPath C:\



UserPictures (This will replace the default user.png file with whatever corporate one you want)
Note, this requires GPO to be set:

Computer Configuration > Administrative Templates > Control Panel > User Accounts.

Double-click Apply the default user logon picture to all users, and enable this setting. Click OK/Apply and Exit

Or, set a registry Key:


In the right panel, right click and select New > DWORD (32-bit) Value. Give it name UseDefaultTile.

Click on Modify. Enter Value data as 1 for this DWORD (32-bit) and hit OK. A new registry enter will be added.


This I did because of Branding, our Communication Department provided me with the .png logo files, which I then had to modify to look good in Windows 10 "Profile CIRCLE" they use.  Because it's a CIRCLE, it would cut off the edges, so I used Paint.NET to increase the Canvas Size so when Windows trims the edges to fit the CIRCLE window, it doesn't cut off any of the logo.

Once it enlarges the Canvas, you'll have to Delete the "White Space"


Once you have your Company Logos Created, you can then use a simple copy command.
xcopy UserPictures\* "%SystemDrive%\ProgramData\Microsoft\User Account Pictures" /Q /Y /I


Windows 10 Explorer Tweaks (Cleans up Explorer, sets the "Launch To")
Idea adapted from here:

This will clean up Explorer, goes straight to this, instead of using the Quick Access view.

I then use a separate Step in the TS to import Each Key:


RegFiles: (You can download them from the Site too:
Windows Registry Editor Version 5.00


Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; Tutorial:


Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; Tutorial:


Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; Tutorial:




I hope you find this useful, if you have any comments, improvements, give me a shout out on Twitter @gwblok
Download the OSDWindows10Scripts Folder here:


New blog thanks to peer pressure

Just finished up a great MMS #mmsmoa conference today.  I was challenged to blog several solutions for Windows deployments, among other useful things I've come up with over the past few years.  So at their request, I've resurrected my old domain name and will now use it to blog about technology.

I've created this instance of WordPress and blog post from my phone, so I'm going to keep this short.

Look for several posts to come soon about Windows 10 deployments, among other OSD centered content.

Thanks to all the MVPs that made it to MN for MMS.