5 Commits

Author SHA1 Message Date
3f805bead7 Merge pull request 'Update 'README.md'' (#13) from readme_csharp into master
Reviewed-on: #13
2021-06-29 10:45:37 -04:00
dbe2543217 Update 'README.md'
Update the README.md to reflect the work being done to rewrite the program in c#.
2021-06-29 10:42:33 -04:00
9170d37d0c Update 'quickrun.bat'
quickrun.bat was not resetting the execution policy. This fixes this.
2021-05-05 17:53:14 -04:00
bf11d64feb Merge pull request 'Add domain to the collected information' (#11) from Add_Domain into master
Reviewed-on: #11
2021-04-28 18:15:33 -04:00
4ff0c92217 Add domain to the collected information 2021-04-28 18:12:28 -04:00
3 changed files with 13 additions and 2 deletions

View File

@@ -92,3 +92,11 @@ It will require the ability to run Powershell Scripts which is restricted by def
## Dev Notes ## Dev Notes
Going forward branch master will be write protected. Please do all further work on branches off of master. Going forward branch master will be write protected. Please do all further work on branches off of master.
I will be starting to work on rewriting the main script in C#. This will afford the following advangages:
* An executable. This will have the advange of not having to mess with the Powershell ExecutionPolicy everytime you want to run the scritp.
* The Autorun in the USB_Run.zip file will actually be able to launch the script.
* With it being writin in C# it should be more extensable and somewhat easier to manintain.

View File

@@ -3,4 +3,4 @@ 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.
Powershell.exe -command "$current_execution_policy = Get-ExecutionPolicy; Set-ExecutionPolicy Bypass CurrentUser;$current_path = pwd; .\sysinfo.ps1 -write_output -file_location $current_path.Path" Powershell.exe -command "$current_execution_policy = Get-ExecutionPolicy; Set-ExecutionPolicy Bypass CurrentUser;$current_path = pwd; .\sysinfo.ps1 -write_output -file_location $current_path.Path;Set-ExecutionPolicy $current_execution_policy CurrentUser"

View File

@@ -57,6 +57,7 @@ function Find-Computer-Info {
#Init array for storing computer's data #Init array for storing computer's data
$computer_info = @("HOSTNAME:", $cs.Name, $computer_info = @("HOSTNAME:", $cs.Name,
"Domain:", $cs.Domain,
"OS Version:", $computer_os_info.Caption, "OS Version:", $computer_os_info.Caption,
"OS Architecture:", $computer_os_info.OSArchitecture, "OS Architecture:", $computer_os_info.OSArchitecture,
"Manufacture:", $cs.manufacturer, "Manufacture:", $cs.manufacturer,
@@ -94,6 +95,7 @@ function Show-Computer-Info { # Function writes by default to stdout. If given a
function Find-Computer-Info_7 { function Find-Computer-Info_7 {
$cs_hostname = wmic computersystem get name $cs_hostname = wmic computersystem get name
$cs_domain = wmic computersystem get Domain
$os_name = wmic os get Caption $os_name = wmic os get Caption
$os_arch = wmic computersystem get SystemType $os_arch = wmic computersystem get SystemType
$cpu_name = wmic cpu get name $cpu_name = wmic cpu get name
@@ -105,6 +107,7 @@ function Find-Computer-Info_7 {
$computer_info_7 = @( $computer_info_7 = @(
"HOSTNAME:", $cs_hostname[2], "HOSTNAME:", $cs_hostname[2],
"Domain:", $cs_domain[2],
"OS Version:", $os_name[2], "OS Version:", $os_name[2],
"OS Architecture:", $os_arch[2], "OS Architecture:", $os_arch[2],
"Manufacture:", $cs_manufacturer[2], "Manufacture:", $cs_manufacturer[2],