Post your SCCM tips and tricks, requests for help, or links others might find useful! Post not showing up?It might have been caught by the spam filter. URL shorteners cause this almost every time, but so do strings of apparent gibberish like WSUS and PXE sometimes. We don't check the modqueue very often. if your post is stuck!Resources:.(largely outdated)Chat Groups.Current Version:.Flair:. Flair is reserved for Microsoft employees and MVPs.
Please send mod mail if you qualify and would like flair set for your account.Contributing MVPs.Contributing Microsoft Employees. I'm just wondering is it possible to run a batch file automatically after an application is installed via Software Centre?Now I could publish the batch file via a package to just the machines that need it, but is there a way I can get SCCM to do it for me automatically?Or would I need to publish a batch file to first install the application and then run the batch file upon completion of the application install?An example of this is to run a batch file to disable an application such as FileZilla from checking for updates automatically.Any advised would be a big help:). Use the batch file to launch the installer, then your stuff after.example, i use this batch file to launch flash uninstaller, then after it runs it does a reg cleanup,taskkill /f /im 'flash.' uninstallflashplayer.exe -uninstall -force:: Log settingsset LOGPATH=%SystemDrive%Logsset LOGFILE=%COMPUTERNAME%Flashremoval.log:: Create the log directory if it doesn't existif not exist%LOGPATH% mkdir%LOGPATH%if exist '%LOGPATH%%LOGFILE%' del '%LOGPATH%%LOGFILE%'call:log '%CURDATE%%TIME% Commencing registry cleanup.' Call:log '%CURDATE%%TIME% Searching for residual registry keys.' Reg query HKLMsoftwareclassesinstallerproducts /f ' flash' /s find 'HKEYLOCALMACHINE' %TEMP%Flashpurgeregistrykeys.txtreg query HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall /f ' flash' /s find 'HKEYLOCALMACHINE' %TEMP%Flashpurgeregistrykeys.txtreg query HKLMSOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall /f ' flash' /s find 'HKEYLOCALMACHINE' %TEMP%Flashpurgeregistrykeys.txt:: List the leftover registry keyscall:log '%CURDATE%%TIME% Found these keys.'
Echo. '%LOGPATH%%LOGFILE%'echo.type%TEMP%Flashpurgeregistrykeys.txt '%LOGPATH%%LOGFILE%'type%TEMP%Flashpurgeregistrykeys.txtecho. '%LOGPATH%%LOGFILE%'echo.:: Backup the various registry keys that will get deleted (if they exist):: We do this mainly because we're using wildcards, so we want a method to roll back if we accidentally nuke the wrong thingcall:log '%CURDATE%%TIME% Backing up keys.' If exist '%TEMP%Flashpurgeregistrybackup' rmdir /s /q '%TEMP%Flashpurgeregistrybackup' 2NULmkdir%TEMP%Flashpurgeregistrybackup NUL:: This line walks through the file we generated and dumps each key to a filefor /f 'tokens=. delims= '%%a in (%TEMP%Flashpurgeregistrykeys.txt) do (reg query%%a) %TEMP%FlashpurgeregistrybackupFlashregkeys1.bakecho.call:log '%CURDATE%%TIME% Keys backed up to%TEMP%Flashpurgeregistrybackup'call:log '%CURDATE%%TIME% This directory will be deleted at next reboot, so get it now if you need it!'
Select the folder on the target system that contains the executable file that you want to be launched, or click the ellipsis button (.) to select or create the folder. For example, if you want to launch Notepad.exe, enter SystemFolder in the File Location setting, and enter Notepad.exe in the File Name and Command Line setting.
:: Purge the keyscall:log '%CURDATE%%TIME% Purging keys.' Echo.:: This line walks through the file we generated and deletes each key listedfor /f 'tokens=. delims= '%%a in (%TEMP%Flashpurgeregistrykeys.txt) do reg delete%%a /f '%LOGPATH%%LOGFILE%' 2NUL.