This commit is contained in:
USER
2025-08-29 16:12:28 +01:00
parent 996595f38a
commit ead94820ac
4 changed files with 55 additions and 7 deletions

View File

@ -1,10 +1,7 @@
@echo off
set check_computername=%COMPUTERNAME%
echo "Found computer %check_computername%"
set PACKAGES="C:\Packages"
set WPUBLIC="C:\wPublic"
call C:\Scripts\wBase\baseENV.bat
call C:\Scripts\wLocal\localENV.bat
echo "Dump software list"
set PSFILE="%WPUBLIC%\bin\ListSoftware.ps1"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% > "C:\%check_computername%.txt"
set PSFILE="%WBASE%\bin\SoftwareList.ps1"
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE% > "C:\%check_computername%.txt"

43
bin/SoftwareList.ps1 Executable file
View File

@ -0,0 +1,43 @@
function listAumids( $userAccount ) {
if ($userAccount -eq "allusers")
{
# Find installed packages for all accounts. Must be run as an administrator in order to use this option.
$installedapps = Get-AppxPackage -allusers
}
elseif ($userAccount)
{
# Find installed packages for the specified account. Must be run as an administrator in order to use this option.
$installedapps = get-AppxPackage -user $userAccount
}
else
{
# Find installed packages for the current account.
$installedapps = get-AppxPackage
}
$aumidList = @()
foreach ($app in $installedapps)
{
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
{
$aumidList += $app.packagefamilyname + "!" + $id
}
}
return $aumidList
}
# Get a list of AUMIDs for the current account:
listAumids
# Get a list of AUMIDs for an account named “CustomerAccount”:
listAumids("CustomerAccount")
# Get a list of AUMIDs for all accounts on the device:
listAumids("allusers")
get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
Get-AppxPackage -allusers

View File

@ -1,3 +1,7 @@
@echo off
call C:\Scripts\wBase\baseENV.bat
call C:\Scripts\wLocal\localENV.bat
xcopy "S:\WordPad\Windows NT\Accessories" "C:\Program Files\Windows NT\Accessories" /h /e

View File

@ -1 +1,5 @@
@echo off
call C:\Scripts\wBase\baseENV.bat
call C:\Scripts\wLocal\localENV.bat
choco uninstall git notepadplusplus -y -force