5 Commits

Author SHA1 Message Date
9c16227e91 Run from USB 2021-04-28 10:17:30 -04:00
8339c3b1b3 Merge pull request 'Update Quickrun Instructions' (#7) from Update_quickrun into master
Reviewed-on: #7
2021-04-28 09:47:53 -04:00
a6550b4b16 Update Quickrun Instructions
The instructions have been wrapped into a single Powershell command.
2021-04-28 09:46:58 -04:00
b346d7f79d Merge pull request 'Update to Powershell to accomidate Windows 7' (#3) from Win7_Fix into master
Reviewed-on: #3
2021-04-27 15:37:52 -04:00
614c45738e Merge pull request 'issue-#4 Fix' (#5) from issue-#4 into Win7_Fix
Reviewed-on: #5
2021-04-27 15:36:55 -04:00
2 changed files with 27 additions and 9 deletions

View File

@@ -24,21 +24,42 @@ It currently outputs:
## Quick Run ## Quick Run
### From USB Stick
Download the USB_Run.zip latest release from [Releases](https://efrick.ddns.net/git/efrick/Sysinfo/releases).
Unzip and copy the folder to a USB stick.
Click on the file `quickrun.bat`
This will put the output file into the directory it was run from.
### From Web
Copy and past into `CMD` Copy and past into `CMD`
**[Note:]** must be run from an admin prompt. **[Note:]** must be run from an admin prompt.
This command is broken out below.
```powershell ```powershell
curl https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sysinfo.ps1 > %userprofile%\AppData\Local\Temp\sysinfo.ps1; Powershell.exe -command "$current_execution_policy = Get-ExecutionPolicy; Set-ExecutionPolicy Bypass CurrentUser; (New-Object System.Net.WebClient).DownloadFile('https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sysinfo.ps1', 'sysinfo.ps1'); .\sysinfo.ps1 -write_output;rm .\sysinfo.ps1; Set-ExecutionPolicy $current_execution_policy CurrentUser"
Powershell.exe -command "$current_execution_policy = Get-ExecutionPolicy; Set-ExecutionPolicy Bypass CurrentUser ;cd $env:userprofile; AppData\Local\Temp\sysinfo.ps1 -write_output; Set-ExecutionPolicy $current_execution_policy CurrentUser"
del %userprofile%\AppData\Local\Temp\sysinfo.ps1
``` ```
This copies the bat file to a temporary location and runs it with the command switch to write the results to the desktop. This copies the bat file to a temporary location and runs it with the command switch to write the results to the desktop.
#### Powershell Breakout
Below is a breakout of the Powershell commands run by the Quickrun above.
```powershell
$current_execution_policy = Get-ExecutionPolicy
Set-ExecutionPolicy Bypass CurrentUser
(New-Object System.Net.WebClient).DownloadFile("https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sysinfo.ps1", "sysinfo.ps1")
.\sysinfo.ps1 -write_output
rm .\sysinfo.ps1
Set-ExecutionPolicy $current_execution_policy CurrentUser
```
## Command Switches ## Command Switches
The following can be selected at run-time. The following can be selected at run-time.

View File

@@ -2,8 +2,5 @@ ECHO off
REM Runs the quick run commands form the readme.md REM Runs the quick run commands form the readme.md
REM https://efrick.ddns.net/git/efrick/Sysinfo/src/branch/master/README.md#quick-run REM https://efrick.ddns.net/git/efrick/Sysinfo/src/branch/master/README.md#quick-run
REM This must be run from an elevated prompt. REM This must be run from an elevated prompt.
curl https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sysinfo.ps1 > %userprofile%\AppData\Local\Temp\sysinfo.ps1;
Powershell.exe -command "cd $env:userprofile; AppData\Local\Temp\sysinfo.ps1 -write_output" Powershell.exe -command "$current_execution_policy = Get-ExecutionPolicy; Set-ExecutionPolicy Bypass CurrentUser;$current_path = pwd; .\sysinfo.ps1 -write_output -file_location $current_path.Path"
del %userprofile%\AppData\Local\Temp\sysinfo.ps1