-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (54 loc) · 2.56 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: MID windows
on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test -- --nocapture
- name: Get csproduct UUID
run: wmic csproduct get UUID
- name: Get csproduct UUID from powershell
run: powershell -WindowStyle Hidden -command "Get-WmiObject Win32_ComputerSystemProduct | Select-Object -ExpandProperty UUID"
- name: Get diskdrive serialnumber
run: wmic diskdrive get serialnumber
- name: Get bios serialnumber
run: wmic bios get serialnumber
- name: Get bios serialnumber from powershell
run: powershell -WindowStyle Hidden -command "Get-WmiObject Win32_BIOS | Select-Object -ExpandProperty SerialNumber"
- name: Get win32_baseboard serialnumber
run: wmic path win32_baseboard get serialnumber
- name: Get win32_baseboard serialnumber from powershell
run: powershell -WindowStyle Hidden -command "Get-WmiObject Win32_BaseBoard | Select-Object -ExpandProperty SerialNumber"
- name: Get os serialnumber
run: wmic os get serialnumber
- name: Get cpu processorid
run: wmic cpu get processorid
- name: Get cpu processorid from powershell
run: powershell -WindowStyle Hidden -command "Get-WmiObject Win32_Processor | Select-Object -ExpandProperty ProcessorId"
- name: Get memorychip serialnumber
run: wmic memorychip get serialnumber
- name: Get softwarelicensingservice
run: wmic path softwarelicensingservice get OA3xOriginalProductKey
# - name: Get MachineGuid
# run: for /f "skip=2 tokens=3" %a in ('reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography /v MachineGuid') do @echo %a
- name: Get MachineGuid
run: |
$MachineGuid = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Cryptography" -Name "MachineGuid").MachineGuid
Write-Output $MachineGuid
- name: Gather Hardware Info
run: |
$csproduct = Get-WmiObject Win32_ComputerSystemProduct | Select-Object -ExpandProperty UUID
$bios = Get-WmiObject Win32_BIOS | Select-Object -ExpandProperty SerialNumber
$baseboard = Get-WmiObject Win32_BaseBoard | Select-Object -ExpandProperty SerialNumber
$cpu = Get-WmiObject Win32_Processor | Select-Object -ExpandProperty ProcessorId
"$csproduct|$bios|$baseboard|$cpu"
shell: pwsh