Skip to content

Commit

Permalink
Merge pull request #115 from mniederw/trunk
Browse files Browse the repository at this point in the history
Merge trunk to main - Unittests are successful - Merge pull request #112 from mniederw/trunk
  • Loading branch information
mniederw authored Aug 15, 2024
2 parents a09f081 + 4c8edf2 commit 00cb6cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion MnCommonPsToolLib/MnCommonPsToolLib.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,8 @@ function ProcessStart ( [String] $cmd, [String[]] $cmdAr
function ProcessStartByArray ( [String[]] $cmdAndArgs, [Boolean] $careStdErrAsOut = $false, [Boolean] $traceCmd = $false ){
Assert ($cmdAndArgs.Length -gt 0) "Expected at least the command but cmdAndArgs is empty. ";
[String] $cmd = $cmdAndArgs[0];
[String[]] $cmdArgs = @()+($cmdAndArgs[1..($cmdAndArgs.Length-1)]);
[String[]] $cmdArgs = @();
if( $cmdAndArgs.Count -lt 1 ){ $cmdArgs += $cmdAndArgs[1..($cmdAndArgs.Length-1)]; }
return [String] (ProcessStart $cmd $cmdArgs $careStdErrAsOut $traceCmd); }
function ProcessStartByCmdLine ( [String] $cmdLine, [Boolean] $careStdErrAsOut = $false, [Boolean] $traceCmd = $false ){
return [String] (ProcessStartByArray (StringCommandLineToArray $cmdLine) $careStdErrAsOut $traceCmd); }
Expand Down
2 changes: 1 addition & 1 deletion MnCommonPsToolLib/MnCommonPsToolLib_Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function OsWindowsFeatureDoUninstall ( [String] $name ){
if( -not $res.Success ){ throw [Exception] "Uninstall $name was not successful, please solve manually. $out"; } }
function OsWindowsRegRunDisable ( [String] $regItem, [Boolean] $fromHklmNotHkcu = $false ){
# for future use: create key "AutorunsDisabled" and copy removed item to it
if( fromHklmNotHkcu ){
if( $fromHklmNotHkcu ){
OutProgress "Autorun-CurrentUser-Remove: $regItem";
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run" -Name $regItem -ErrorAction SilentlyContinue;
}else{
Expand Down

0 comments on commit 00cb6cd

Please sign in to comment.