@Echo off
chcp 1252 >nul
set hard=%userdomain%-Hardware.html
set soft=%userdomain%-Software.html
Echo.
Echo Möchtest Du die Informationen zur Hard- und Software in einem Ordner auf dem Desktop, oder am Ort des Scriptes ablegen lassen?
Echo.
Echo - Drücke "D", um die Infos auf dem Desktop zu erstellen.
Echo - Drücke "O", um die Infos in einem Ordner am Ausführungsort des Scriptes zu erstellen.
Echo.
choice /c:"DO" /n /m " Deine Wahl ist: "
if errorlevel 2 goto ordner
if errorlevel 1 goto desk
:ordner
md "%~dp0\%userdomain%-Rechnerinformation" 2>nul
set desk="%~dp0\%userdomain%-Rechnerinformation"
goto data
:desk
md "%userprofile%\Desktop\%userdomain%-Rechnerinformation" 2>nul
set desk="%userprofile%\Desktop\%userdomain%-Rechnerinformation"
goto data
:data
Echo.
Echo Die Informationen zur Hardware, zur Software oder beides ermitteln?
Echo.
Echo - Drücke den Buchstaben "H", um nur Hardwareinformationen zu speichern.
Echo - Drücke den Buchstaben "S", um nur Softwareinformationen zu speichern.
Echo - Drücke den Buchstaben "B", um Angaben zur Hard- und Software zu speichern.
Echo.
choice /c:"HSB" /n /m " Deine Auswahl ist: "
if errorlevel 3 goto beides
if errorlevel 2 goto software
if errorlevel 1 goto hardware
:hardware
echo Die Informationen zu Ihrer Hardware werden nach: %desk%\%hard% gespeichert!
wmic path win32_computersystemproduct get Caption, Description, IdentifyingNumber, Name, Version, Vendor /format:htable >%desk%\%hard%
wmic path win32_bios get Manufacturer, SMBIOSBIOSVersion, Version /format:htable >>%desk%\%hard%
wmic path win32_baseboard get Manufacturer, Name, Product /format:htable >>%desk%\%hard%
wmic path win32_processor get Caption, Name, CurrentClockspeed, MaxClockspeed /format:htable >>%desk%\%hard%
wmic path win32_physicalmemory get Devicelocator, Capacity, Manufacturer, Partnumber, Speed /format:htable >>%desk%\%hard%
wmic path win32_diskdrive get Description, Model, Size, DeviceID, MediaType, PNPDeviceID /format:htable >>%desk%\%hard%
wmic path Win32_DiskPartition get Bootable, Description, DeviceID, DiskIndex, Index, PrimaryPartition, Size /format:htable >>%desk%\%hard%
wmic path Win32_Volume get Automount, Availability, BlockSize, BootVolume, Capacity, Caption, Driveletter /format:htable >>%desk%\%hard%
wmic path win32_cdromdrive get Description, Drive, Name, PNPDeviceID /format:htable >>%desk%\%hard%
wmic path win32_videocontroller get Caption, VideoModeDescription, PNPDeviceID /format:htable >>%desk%\%hard%
wmic path win32_sounddevice get Caption, Status, PnPDeviceID /format:htable >>%desk%\%hard%
wmic path win32_desktopmonitor get Description, ScreenHeight, ScreenWidth, PNPDeviceID /format:htable >>%desk%\%hard%
wmic path Win32_USBController get Caption, DeviceId, Status /format:htable >>%desk%\%hard%
wmic path win32_networkadapter get Caption, Adaptertype, ServiceName, PNPDeviceID /format:htable >>%desk%\%hard%
wmic path win32_printer get DeviceId, DriverName /format:htable >>%desk%\%hard%
goto eof
:software
echo Die Informationen zu Ihrer Software werden nach: %desk%\%soft% gespeichert!
wmic path win32_operatingsystem get Caption, OSArchitecture, BuildType, Version /format:htable >%desk%\%soft%
wmic path Win32_PageFile get Caption, FileSize, FileType, InitialSize, MaximumSize /format:htable >>%desk%\%soft%
wmic path win32_startupcommand get Command, Location, Description /format:htable:"sortby=State" >>%desk%\%soft%
wmic path win32_product get Caption, Vendor, Version /format:htable:"sortby=Caption" >>%desk%\%soft%
wmic path win32_process get Description, ProcessID, Handle, Handlecount /format:htable:"sortby=ProcessID" >>%desk%\%soft%
wmic path win32_service get Caption, ProcessID, State, Startname /format:htable:"sortby=State" >>%desk%\%soft%
goto eof
:beides
call :hardware
call :software
goto eof
:eof