Answer the question
In order to leave comments, you need to log in
Launching cmd after receiving a list with txt, how?
Good afternoon, I need to get a list of installed programs,
@echo off
call :get_soft_list hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
call :get_soft_list hklm\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
call :get_soft_list hkcu\Software\Microsoft\Windows\CurrentVersion\Uninstall
goto the_end
:get_soft_list %1
for /F "tokens=1,2,*" %%a in ('reg query "%1" /s') do ^
if "%%a" == "DisplayName" echo %%c
exit /b
:the_end
Answer the question
In order to leave comments, you need to log in
here is an option. perhaps not very beautiful, but it should work)
the PsExec utility will be needed. powershell example
Import-CSV ".\computers.csv" -header("ComputerName") | ForEach {
$ComputerName = $_.ComputerName #чуть-чуть упростим, мне так удобнее :)
New-Item $ComputerName\c$\temp -Type Directory
Copy-Item "script.cmd" $ComputerName\c$\temp\
.\psexec.exe \\$ComputerName "C:\\temp\\script.cmd"
}
I need to get a list of installed programsUse the free Spiceworks Inventory .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question