Skip to content

Commit

Permalink
Replaced deprecated wmic command
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Herranz Ramírez committed Jan 27, 2025
1 parent 580097f commit 94a5136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/windowsbasetest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ sub wait_boot_windows {
$self->run_in_powershell(cmd => 'reg add "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v DisableNotificationCenter /t REG_DWORD /d 1');
$self->run_in_powershell(cmd => 'reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\PushNotifications" /v ToastEnabled /t REG_DWORD /d 0');
# Prevent password from expiring:
$self->run_in_powershell(cmd => 'wmic UserAccount set PasswordExpires=False');
$self->run_in_powershell(cmd => 'Set-ADUser -Identity "username" -PasswordNeverExpires $true');
record_info 'Port close', 'Closing serial port...';
$self->run_in_powershell(cmd => '$port.close()', code => sub { });
$self->run_in_powershell(cmd => 'exit', code => sub { });
Expand Down

0 comments on commit 94a5136

Please sign in to comment.