Solved Help cmd | Export PC Specs to my usb


4GEEK

New member
Local time
10:06 AM
Posts
10
OS
Windows 11
Hyper-V.png

1. I need to export the info.txt file that contains the computer information on my usb.

2. And it will be better if I can loop the "CD" commands and execute directly info.bat without having to write all these commands at startup

Info.bat :

Batch:
wpeinit
@echo off
setlocal enabledelayedexpansion
set ScriptName=bat.ps1
set USBDrivePath=X:\Windows\System32\Apps\

echo Checking for the script in %USBDrivePath%...

rem Check if the specified path exists
if exist "%USBDrivePath%%ScriptName%" (
    echo USB drive found at %USBDrivePath%.
    echo Executing script: %USBDrivePath%%ScriptName%
    powershell -ExecutionPolicy Bypass -File "%USBDrivePath%%ScriptName%"
) else (
    echo USB drive not found or script not present.
    pause
)

endlocal

bat.ps1 :

Powershell:
# Set the path for the USB drive
$usbDrivePath = "X:\Windows\System32\Apps\"

# Gather system information
$namespace = "ROOT\cimv2"

# Battery Information
$battery = Get-CimInstance -Namespace $namespace -ClassName "Win32_Battery"
$namespace = "ROOT\WMI"
$FullChargedCapacity = (Get-CimInstance -Namespace $namespace -ClassName "BatteryFullChargedCapacity").FullChargedCapacity
$DesignedCapacity = (Get-WmiObject -Namespace $namespace -ClassName "BatteryStaticData").DesignedCapacity
$batteryInfo = "No battery information available."
if ($battery) {
    $batteryInfo = @"
$([math]::Round(($FullChargedCapacity / $DesignedCapacity) * 100)) %
"@
}

# Device Info
$ComputerModel = (Get-WmiObject -Class:Win32_ComputerSystem).Model

# CPU Information
$cpu = Get-CimInstance -ClassName Win32_Processor
$cpuName = $cpu.Name

# GPU Information
$gpu = Get-CimInstance -Namespace root\cimv2 -ClassName Win32_VideoController
$gpuName = $gpu.Name -join "; "  # Join multiple GPUs if present

# Memory Information
$memory = Get-CimInstance -ClassName Win32_PhysicalMemory
$totalMemory = 0
foreach ($m in $memory) {
    $totalMemory += $m.Capacity
}
$totalMemoryGB = [math]::Round($totalMemory / 1GB)

# Physical Disk Information
$diskInfo = ""
$primaryDisk = Get-CimInstance -ClassName Win32_DiskDrive | Where-Object { $_.Index -eq 0 }

if ($primaryDisk) {
    $totalSizeGB = [math]::Round($primaryDisk.Size / 1GB, 2)
    $diskInfo = "$totalSizeGB GB"
} else {
    $diskInfo = "No primary disk found."
}

# Prompt the user for BIOS information
$biosInfo = Read-Host "Please enter BIOS information"

# Display system information
Write-Host "-------------------------------------"
Write-Host "Computer Model: $ComputerModel"
Write-Host "Battery Info: $batteryInfo"
Write-Host "CPU: $cpuName"
Write-Host "GPU: $gpuName"
Write-Host "Memory: $totalMemoryGB GB"
Write-Host "Disk: $diskInfo"
Write-Host "BIOS Information: $biosInfo"
Write-Host "-------------------------------------"

# Set the path for the output text file
$txtFilePath = "${usbDrivePath}Info.txt"  # Save to the USB drive

# Function to gather additional information
function Gather-Information {
    $screenInfo = Read-Host "Please enter screen information"
    $keyboardInfo = Read-Host "Please enter keyboard information"
    $otherInfo = Read-Host "Please enter other information"
    $priceInfo = Read-Host "Please enter price information"

    return @{
        Screen = $screenInfo
        Keyboard = $keyboardInfo
        Other = $otherInfo
        Price = $priceInfo
    }
}

# Function to export information to a text file with UTF-8 encoding
function Export-Information {
    param (
        [hashtable]$systemInfo,
        [hashtable]$userInfo,
        [int]$entryNumber  # Accept the entry number
    )

    # Create a formatted string for output
    $output = @"
Date: $(Get-Date)
Number: $entryNumber
Computer Model: $($systemInfo.ComputerModel)
Battery Info: $($systemInfo.BatteryInfo)
CPU: $($systemInfo.CPU)
GPU: $($systemInfo.GPU)
Memory: $($systemInfo.MemoryGB) GB
Disk: $($systemInfo.DiskInfo)
BIOS Information: $($systemInfo.BIOSInfo)
Screen: $($userInfo.Screen)
Keyboard: $($userInfo.Keyboard)
Other Information: $($userInfo.Other)
Price: $($userInfo.Price)
"@

    # Append the information to the text file with UTF-8 encoding
    $output | Out-File -FilePath $txtFilePath -Encoding UTF8 -Append
    Write-Host "System information saved to $txtFilePath"
}

# Function to run the keyboard test utility
function Run-keytest {
    $keyboardTestPath = "${usbDrivePath}keytest.exe"

    if (-Not (Test-Path $keyboardTestPath)) {
        Write-Host "keytest not found in $usbDrivePath."
        return $false
    }

    try {
        Start-Process -FilePath $keyboardTestPath -Wait
        return $true
    } catch {
        Write-Host "Failed to run keytest: $_"
        return $false
    }
}

# Function to eject the USB drive
function Eject-USB {
    $ejectCommand = "powershell -command ""(New-Object -COMObject Shell.Application).Namespace('$usbDrivePath').InvokeVerb('Eject')"""
    Start-Process -FilePath powershell -ArgumentList $ejectCommand -Wait
    Write-Host "USB drive '$usbDrivePath' ejected."
}

# Main script execution
Write-Host "Starting keyboard test utility..."

# Prompt the user for the starting number
$startingNumber = Read-Host "Please enter the starting number"

if (-not [int]::TryParse($startingNumber, [ref]$null)) {
    Write-Host "Invalid number entered. Please enter a valid integer."
    exit 1
}

if (Run-keytest) {
    Write-Host "Keyboard test completed. Proceeding to enter additional information."
    
    # Gather system information into a hashtable
    $systemInfo = @{
        ComputerModel = $ComputerModel
        BatteryInfo = $batteryInfo
        CPU = $cpuName
        GPU = $gpuName
        MemoryGB = $totalMemoryGB
        DiskInfo = $diskInfo
        BIOSInfo = $biosInfo  # Include user-entered BIOS information
    }
    
    # Call the function to gather additional information
    $userInfo = Gather-Information
    
    # Export everything to a text file with the user-defined starting number
    Export-Information -systemInfo $systemInfo -userInfo $userInfo -entryNumber $startingNumber 

    # Eject the USB drive
    Eject-USB

    # Shutdown the PC
    Stop-Computer -Force
} else {
    Write-Host "Keyboard test was not completed successfully."
}
 
Windows Build/Version
WinPE

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Modèle HP EliteBook x360 1030 G3
I was going to mention my method of using System and Copy the Device specs and Windows specs then Paste in Notepad and save as a text/.txt file wherever desired but then I saw mention of Windows Build/Version WinPE so will pass on it as I don't use that.

For the information I may need I use 4 different portable diagnostics on a Thumb drive and save their output to it.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
I was going to mention my method of using System and Copy the Device specs and Windows specs then Paste in Notepad and save as a text/.txt file wherever desired but then I saw mention of Windows Build/Version WinPE so will pass on it as I don't use that.
Thank's Berton

My batch file works fine on windows but now I'm at cmd X:Windows\Systeme32 outside the windows and when I boot on the pc I can't find the letter of my usb so that I can update my batch file and my powershell file
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Modèle HP EliteBook x360 1030 G3
Does the USB drive show in Disk Management or Device Manager? If it is in Disk Management it should have a Drive letter assigned. Can other USB devices work? If not maybe the BIOS is not being properly read and letting WinPE load drivers.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
Does the USB drive show in Disk Management or Device Manager? If it is in Disk Management it should have a Drive letter assigned. Can other USB devices work? If not maybe the BIOS is not being properly read and letting WinPE load drivers.
I find it via diskpart and regedit too , but the letter is not there
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Modèle HP EliteBook x360 1030 G3
I have this script that collects PC information.

Code:
:: Collecting System Information on Windows 10 and Windows 11

@Echo Off   
    

(Net session >nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)

Cls & Mode CON  LINES=11 COLS=65 & Color 0E

  

Echo.
Echo.
Echo.
Echo.       
Echo              Collecting System Information   
Echo.       
Echo                       Please Wait...
Echo.

If not exist "C:\SysInfo" Md "C:\SysInfo"

Systeminfo > "C:\SysInfo\Systeminfo.txt"

GPRESULT /r /z  > "C:\SysInfo\GroupPolicy.txt"

GPRESULT /f /h "C:\SysInfo\GroupPolicy.html" 2>&1>nul

If Exist %SystemRoot%\MiniDump\*.dmp Copy %SystemRoot%\MiniDump\*.dmp "C:\SysInfo" 2>&1>nul

Copy %SystemRoot%\System32\drivers\etc\hosts  "C:\SysInfo\Hosts.txt" 2>&1>nul

Msinfo32 /nfo "C:\SysInfo\Msinfo32.nfo" 2>&1>nul

If Exist wevtutil.exe Wevtutil qe System /f:text > "C:\SysInfo\SystemEventlog.txt" 2>&1>nul

If Exist wevtutil.exe Wevtutil qe Application /f:text > "C:\SysInfo\ApplicationEventlog.txt" 2>&1>nul

If Exist bcdedit.exe Bcdedit /enum all  > "C:\SysInfo\Bcdedit.txt" 2>&1>nul

Dxdiag /t "C:\SysInfo\dxdiag.txt"

powercfg.exe /energy /duration 10 /output  "C:\SysInfo\Energy_Report.html" 2>&1>nul

PowerShell Get-CimInstance -ClassName Win32_Process ^| Out-File -FilePath "C:\SysInfo\Process.txt"

PowerShell Get-Service ^| where status -eq "Running" ^| Out-File -FilePath "C:\SysInfo\RunningServices.txt"

PowerShell Get-Service ^| where status -eq "stopped" ^| Out-File -FilePath "C:\SysInfo\StoppedServices.txt"

PowerShell Get-WindowsOptionalFeature -Online ^| ? state -eq "disabled" ^| select featurename ^| sort -Descending ^| Out-File -FilePath "C:\SysInfo\DisabledFeatures.txt"

PowerShell Get-psdrive -psprovider filesystem ^| Out-File -FilePath "C:\SysInfo\PartitionList.txt"

PowerShell Get-CimInstance win32_desktop ^| where name -eq (whoami) ^| Out-File -FilePath "C:\SysInfo\CurrentlyLogonUser.txt"

PowerShell Get-CimInstance -ClassName Win32_BIOS ^| Out-File -FilePath "C:\SysInfo\BIOS.txt"

PowerShell Get-CimInstance -ClassName Win32_Processor ^| Select-Object -ExcludeProperty "CIM*" ^| Out-File -FilePath "C:\SysInfo\CPU.txt"

PowerShell Get-CimInstance -ClassName Win32_ComputerSystem ^| Out-File -FilePath "C:\SysInfo\PCModelInformation.txt"

PowerShell Get-CimInstance -ClassName Win32_QuickFixEngineering ^| Out-File -FilePath "C:\SysInfo\Hotfixes.txt"

PowerShell Get-CimInstance -ClassName Win32_OperatingSystem ^| Select-Object -Property BuildNumber,BuildType,OSType,ServicePackMajorVersion,ServicePackMinorVersion ^| Out-File -FilePath "C:\SysInfo\OperatingSystemVersionInformation.txt"

PowerShell Get-CimInstance -ClassName Win32_OperatingSystem ^| Select-Object -Property *user* ^| Out-File -FilePath "C:\SysInfo\RegisteredUser.txt"

PowerShell Get-CimInstance -ClassName Win32_LocalTime ^| Out-File -FilePath "C:\SysInfo\LocalTime.txt"

PowerShell Get-WmiObject win32_baseboard ^| Format-List Product,Manufacturer,SerialNumber,Version,Model,Name ^| Out-File -FilePath "C:\SysInfo\MotherBoardInfo.txt"

PowerShell Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* ^| Select-Object DisplayName, DisplayVersion, Publisher, InstallDate ^| Out-File -FilePath "C:\SysInfo\InstalledPrograms.txt"

PowerShell Get-WindowsDriver -Online -All ^| Out-File -FilePath "C:\SysInfo\Drivers.txt"

PowerShell Get-WindowsEdition -Online ^| Out-File -FilePath "C:\SysInfo\WindowsEdition.txt"

PowerShell Get-NetAdapter -Name * -Physical ^| Out-File -FilePath "C:\SysInfo\NetworkAdapters.txt"

PowerShell Get-NetIPConfiguration -All ^| Out-File -FilePath "C:\\SysInfo\IPConfiguration.txt"

PowerShell Get-WmiObject win32_physicalmemory ^| Format-Table Manufacturer,Banklabel,Configuredclockspeed,Devicelocator,Capacity,Serialnumber -autosize ^| Out-File -FilePath "C:\SysInfo\Memory.txt"



Explorer.exe "C:\SysInfo"
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
I have this script that collects PC information.

Code:
:: Collecting System Information on Windows 10 and Windows 11

@Echo Off  
   

(Net session >nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)

Cls & Mode CON  LINES=11 COLS=65 & Color 0E

 

Echo.
Echo.
Echo.
Echo.      
Echo              Collecting System Information  
Echo.      
Echo                       Please Wait...
Echo.

If not exist "C:\SysInfo" Md "C:\SysInfo"

Systeminfo > "C:\SysInfo\Systeminfo.txt"

GPRESULT /r /z  > "C:\SysInfo\GroupPolicy.txt"

GPRESULT /f /h "C:\SysInfo\GroupPolicy.html" 2>&1>nul

If Exist %SystemRoot%\MiniDump\*.dmp Copy %SystemRoot%\MiniDump\*.dmp "C:\SysInfo" 2>&1>nul

Copy %SystemRoot%\System32\drivers\etc\hosts  "C:\SysInfo\Hosts.txt" 2>&1>nul

Msinfo32 /nfo "C:\SysInfo\Msinfo32.nfo" 2>&1>nul

If Exist wevtutil.exe Wevtutil qe System /f:text > "C:\SysInfo\SystemEventlog.txt" 2>&1>nul

If Exist wevtutil.exe Wevtutil qe Application /f:text > "C:\SysInfo\ApplicationEventlog.txt" 2>&1>nul

If Exist bcdedit.exe Bcdedit /enum all  > "C:\SysInfo\Bcdedit.txt" 2>&1>nul

Dxdiag /t "C:\SysInfo\dxdiag.txt"

powercfg.exe /energy /duration 10 /output  "C:\SysInfo\Energy_Report.html" 2>&1>nul

PowerShell Get-CimInstance -ClassName Win32_Process ^| Out-File -FilePath "C:\SysInfo\Process.txt"

PowerShell Get-Service ^| where status -eq "Running" ^| Out-File -FilePath "C:\SysInfo\RunningServices.txt"

PowerShell Get-Service ^| where status -eq "stopped" ^| Out-File -FilePath "C:\SysInfo\StoppedServices.txt"

PowerShell Get-WindowsOptionalFeature -Online ^| ? state -eq "disabled" ^| select featurename ^| sort -Descending ^| Out-File -FilePath "C:\SysInfo\DisabledFeatures.txt"

PowerShell Get-psdrive -psprovider filesystem ^| Out-File -FilePath "C:\SysInfo\PartitionList.txt"

PowerShell Get-CimInstance win32_desktop ^| where name -eq (whoami) ^| Out-File -FilePath "C:\SysInfo\CurrentlyLogonUser.txt"

PowerShell Get-CimInstance -ClassName Win32_BIOS ^| Out-File -FilePath "C:\SysInfo\BIOS.txt"

PowerShell Get-CimInstance -ClassName Win32_Processor ^| Select-Object -ExcludeProperty "CIM*" ^| Out-File -FilePath "C:\SysInfo\CPU.txt"

PowerShell Get-CimInstance -ClassName Win32_ComputerSystem ^| Out-File -FilePath "C:\SysInfo\PCModelInformation.txt"

PowerShell Get-CimInstance -ClassName Win32_QuickFixEngineering ^| Out-File -FilePath "C:\SysInfo\Hotfixes.txt"

PowerShell Get-CimInstance -ClassName Win32_OperatingSystem ^| Select-Object -Property BuildNumber,BuildType,OSType,ServicePackMajorVersion,ServicePackMinorVersion ^| Out-File -FilePath "C:\SysInfo\OperatingSystemVersionInformation.txt"

PowerShell Get-CimInstance -ClassName Win32_OperatingSystem ^| Select-Object -Property *user* ^| Out-File -FilePath "C:\SysInfo\RegisteredUser.txt"

PowerShell Get-CimInstance -ClassName Win32_LocalTime ^| Out-File -FilePath "C:\SysInfo\LocalTime.txt"

PowerShell Get-WmiObject win32_baseboard ^| Format-List Product,Manufacturer,SerialNumber,Version,Model,Name ^| Out-File -FilePath "C:\SysInfo\MotherBoardInfo.txt"

PowerShell Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* ^| Select-Object DisplayName, DisplayVersion, Publisher, InstallDate ^| Out-File -FilePath "C:\SysInfo\InstalledPrograms.txt"

PowerShell Get-WindowsDriver -Online -All ^| Out-File -FilePath "C:\SysInfo\Drivers.txt"

PowerShell Get-WindowsEdition -Online ^| Out-File -FilePath "C:\SysInfo\WindowsEdition.txt"

PowerShell Get-NetAdapter -Name * -Physical ^| Out-File -FilePath "C:\SysInfo\NetworkAdapters.txt"

PowerShell Get-NetIPConfiguration -All ^| Out-File -FilePath "C:\\SysInfo\IPConfiguration.txt"

PowerShell Get-WmiObject win32_physicalmemory ^| Format-Table Manufacturer,Banklabel,Configuredclockspeed,Devicelocator,Capacity,Serialnumber -autosize ^| Out-File -FilePath "C:\SysInfo\Memory.txt"



Explorer.exe "C:\SysInfo"
Thank's FreeBooter

if I understood your code correctly
It doesn't collect information about the battery and especially the remaining percentage and I need it

my only problem is that the info.txt file should be exported to my usb instead of X:Windows\System32\Apps
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Modèle HP EliteBook x360 1030 G3
The script collects energy information and store it at "C:\SysInfo\Energy_Report.html" file.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
The script collects energy information and store it at "C:\SysInfo\Energy_Report.html" file.
Thank's FreeBooter

But after the data collection I have other tasks to do such as:
Import data from TXT file to Excel and then from Excel to Photoshop
so if I work with your code I have to change a lot of things
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Modèle HP EliteBook x360 1030 G3
1. WMI can't collect the Battery information because your WinPE image is missing the required driver support (ACPI, Serial IO2C, etc.). Integrate the drivers into the boot.wim until it works.

2. If you're using a WinPE image (and not a Windows Setup boot.wim), then you can run scripts out of winpeshl.ini.

3. Don't write your log output to the X:\, which is the RAM disk. Instead you need to determine the USB stick's actual drive letter:

Code:
wpeutil UpdateBootInfo
for /f "usebackq skip=1 tokens=3 delims= " %%l in ( `reg query HKLM\System\CurrentControlSet\Control /v PEBootRAMDiskSourceDrive` ) do set "PendrivePath=%%l"
set "PendriveLetter=%PendrivePath:~0,1%"
 

My Computer

System One

  • OS
    Windows 7
You can also download Aida64 and export a system report in .html file from there.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 (build 22631.4249) test laptop, Windows 11 Pro v24H2 (build 26100.3476) main PC
    Computer type
    Laptop
    Manufacturer/Model
    Acer Extensa 5630EZ
    CPU
    Mobile DualCore Intel Core 2 Duo T7250, 2000 MHz
    Motherboard
    Acer Extensa 5630
    Memory
    4GB
    Graphics Card(s)
    Mobile Intel(R) GMA 4500M (Mobile 4 series)
    Sound Card
    Realtek ALC268 @ Intel 82801IB ICH9 - High Definition Audio Controller
    Monitor(s) Displays
    1
    Screen Resolution
    1280x800
    Hard Drives
    Samsung SSD 850 EVO 250GB SATA Device (250 GB, SATA-III)
    Internet Speed
    VDSL 50 Mbps
    Browser
    MICROSOFT EDGE
    Antivirus
    WINDOWS DEFENDER
    Other Info
    Legacy MBR installation, no TPM, no Secure Boot, no WDDM 2.0 graphics drivers, no SSE4.2, cannot get more unsupported ;) This is only my test laptop. I had installed Windows 11 here before upgrading my main PC. For my main PC I use everyday see my 2nd system specs.
  • Operating System
    Windows 11 Pro v24H2 (build 26100.3476)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom-built PC
    CPU
    Intel Core-i7 3770 3.40GHz s1155 (3rd generation)
    Motherboard
    Asus P8H61 s1155 ATX
    Memory
    2x Kingston Hyper-X Blu 8GB DDR3-1600
    Graphics card(s)
    Gainward NE5105T018G1-1070F (nVidia GeForce GTX 1050Ti 4GB GDDR5)
    Sound Card
    Realtek HD audio (ALC887)
    Monitor(s) Displays
    Sony Bravia KDL-19L4000 19" LCD TV via VGA
    Screen Resolution
    1440x900 32-bit 60Hz
    Hard Drives
    WD Blue SA510 2.5 1000GB SSD as system disk, Western Digital Caviar Purple 4TB SATA III (WD40PURZ) as second
    PSU
    Thermaltake Litepower RGB 550W Full Wired
    Case
    SUPERCASE MIDI-TOWER
    Cooling
    Deepcool Gamma Archer CPU cooler, 1x 8cm fan at the back
    Mouse
    Sunnyline OptiEye PS/2
    Keyboard
    Mitsumi 101-key PS/2
    Internet Speed
    100Mbps
    Browser
    Microsoft Edge, Mozilla Firefox
    Antivirus
    Microsoft Windows Defender
    Other Info
    Legacy BIOS (MBR) installation, no TPM, no Secure Boot, WDDM 3.0 graphics drivers, WEI score 7.4
Why make this stuff so complex

What's wrong with running msinfo32.exe and simply save the file / copy to spreadsheet etc etc.

run (elevated mode) msinfo32.exe and then file->export to any .txt file, now convert to csv (tab delimited etc)for inport into EXCEL.

Skjámynd 2024-10-26 114118.png

Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
1. WMI can't collect the Battery information because your WinPE image is missing the required driver support (ACPI, Serial IO2C, etc.). Integrate the drivers into the boot.wim until it works.

2. If you're using a WinPE image (and not a Windows Setup boot.wim), then you can run scripts out of winpeshl.ini.

3. Don't write your log output to the X:\, which is the RAM disk. Instead you need to determine the USB stick's actual drive letter:

Code:
wpeutil UpdateBootInfo
for /f "usebackq skip=1 tokens=3 delims= " %%l in ( `reg query HKLM\System\CurrentControlSet\Control /v PEBootRAMDiskSourceDrive` ) do set "PendrivePath=%%l"
set "PendriveLetter=%PendrivePath:~0,1%"

Look at : Gathering Battery Information via PowerShell & WMI – GARYTOWN ConfigMgr Blog
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Modèle HP EliteBook x360 1030 G3
You said the problem is gathering this data from WinPE. Which is the subject of your previous threads, and what the first screen shows.
 

My Computer

System One

  • OS
    Windows 7
You said the problem is gathering this data from WinPE. Which is the subject of your previous threads, and what the first screen shows.
Yes, but the problem is that my code couldn't export the information to my usb but it's okay I found the solution I modified my powershell file and the problem was in the name of the usb I modified it and it works thank you for all of you
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Modèle HP EliteBook x360 1030 G3

Latest Support Threads

Latest Tutorials

Back
Top Bottom