Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #########################################################
- #
- # Author: Paul Fulbright
- # Date: 11/27/2013
- # Filename: AppV-IconCollector.ps1
- #
- #########################################################
- # Setup paths and create output folder if needed.
- $location = "C:\ProgramData\App-V"
- $destination = ("C:\Users\{0}\Desktop\IconTest" -f $env:USERNAME)
- if((Test-Path $destination) -ne $true){ New-Item -Path $destination -ItemType Directory -Force }
- $folders = Get-ChildItem -Path $location
- # Find all App-V app folders.
- foreach($folder in $folders) {
- # Import XML and get app name.
- [xml]$manifest = Get-Content -Path (Get-ChildItem -Path $folder.FullName -Recurse | Where-Object{ $_.Name -eq "AppxManifest.xml" }).FullName.ToString()
- $manifest.Package.Properties.Displayname
- # Set output path, create if need be.
- $iconPath = ("{0}\{1}" -f $destination,$manifest.Package.Properties.DisplayName)
- if((Test-Path -Path $iconPath) -ne $true) {
- New-Item -Path $iconPath -ItemType Directory -Force
- }
- # Find .ico files and copy to output path.
- $icons = Get-ChildItem -Path $folder.FullName -Recurse | Where-Object{ $_.Name.Contains(".ico") } | Copy-Item -Destination $iconPath -Force
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement