Atualizacao Pilot_Install
This commit is contained in:
@@ -1,3 +1,32 @@
|
|||||||
|
|
||||||
|
function Initialize-SystemConfiguration {
|
||||||
|
Write-Log "`nSetting High Performance power plan..."
|
||||||
|
Set-HighPerformancePowerPlan
|
||||||
|
|
||||||
|
Write-Log "`nRenaming computer..."
|
||||||
|
Rename-PCToMac
|
||||||
|
|
||||||
|
Write-Log "`nDisabling UAC and notifications..."
|
||||||
|
Disable-UACAndNotifications
|
||||||
|
|
||||||
|
Write-Log "`nSetting main connection as PRIVATE..."
|
||||||
|
Get-NetConnectionProfile |
|
||||||
|
Where-Object { $_.InterfaceAlias -like "*Ethernet*" } |
|
||||||
|
Set-NetConnectionProfile -NetworkCategory Private
|
||||||
|
|
||||||
|
Write-Log "`nAdjusting System Time..."
|
||||||
|
try {
|
||||||
|
Set-Service w32time -StartupType Automatic -ErrorAction SilentlyContinue
|
||||||
|
Start-Service w32time -ErrorAction SilentlyContinue
|
||||||
|
w32tm /resync /force | Out-Null
|
||||||
|
Write-Log "System time synchronized."
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Log "Could not synchronize system time: $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Add-Type -AssemblyName System.Windows.Forms
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
[System.Windows.Forms.Application]::EnableVisualStyles()
|
[System.Windows.Forms.Application]::EnableVisualStyles()
|
||||||
|
|
||||||
@@ -300,11 +329,10 @@ $buttonsPanel.Margin = New-Object System.Windows.Forms.Padding(0)
|
|||||||
$form.Controls.Add($buttonsPanel)
|
$form.Controls.Add($buttonsPanel)
|
||||||
|
|
||||||
$buttons = @(
|
$buttons = @(
|
||||||
@{ Text = "Install Portrait CabTab"; Action = { Install-Pilot -Mode "Portrait" } },
|
@{ Text = "Install Portrait CabTab"; Action = { Initialize-SystemConfiguration; Upgrade-PortraitCabTab } },
|
||||||
@{ Text = "Install Portrait CabTab"; Action = { Install-Pilot -Mode "PortraitR" } },
|
@{ Text = "Install Dual"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "Dual" } },
|
||||||
@{ Text = "Install Dual Lojas"; Action = { Install-Pilot -Mode "Dual" } },
|
@{ Text = "Install Dual Rua"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "DualR" } },
|
||||||
@{ Text = "Install Dual Rua"; Action = { Install-Pilot -Mode "DualR" } },
|
@{ Text = "Install Botoneira"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "Botoneira" } },
|
||||||
@{ Text = "Install Botoneira"; Action = { Install-Pilot -Mode "Botoneira" } },
|
|
||||||
@{ Text = "Exit"; Action = { $form.Close() } }
|
@{ Text = "Exit"; Action = { $form.Close() } }
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -332,10 +360,9 @@ $form.ShowDialog()
|
|||||||
|
|
||||||
|
|
||||||
function Upgrade-PortraitCabTab {
|
function Upgrade-PortraitCabTab {
|
||||||
|
Initialize-SystemConfiguration
|
||||||
|
|
||||||
Set-HighPerformancePowerPlan
|
Initialize-SystemConfiguration
|
||||||
Rename-PCToMac
|
|
||||||
Disable-UACAndNotifications
|
|
||||||
|
|
||||||
Write-Log "`nSetting main connection as PRIVATE..."
|
Write-Log "`nSetting main connection as PRIVATE..."
|
||||||
Get-NetConnectionProfile |
|
Get-NetConnectionProfile |
|
||||||
|
|||||||
Reference in New Issue
Block a user