forked from igoz89/dynasryrdp
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb26cf0
commit 7c325fe
Showing
1 changed file
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,39 @@ | ||
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False | ||
& {$P = $env:TEMP + '\chromeremotedesktophost.msi'; Invoke-WebRequest 'https://dl.google.com/edgedl/chrome-remote-desktop/chromeremotedesktophost.msi' -OutFile $P; Start-Process $P -Wait; Remove-Item $P} | ||
& {$P = $env:TEMP + '\chrome_installer.exe'; Invoke-WebRequest 'https://dl.google.com/chrome/install/latest/chrome_installer.exe' -OutFile $P; Start-Process -FilePath $P -Args '/install' -Verb RunAs -Wait; Remove-Item $P} | ||
# Disable Firewall Profiles | ||
try { | ||
Write-Output "Disabling Firewall Profiles for Domain, Public, and Private..." | ||
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False | ||
Write-Output "Firewall Profiles disabled successfully." | ||
} catch { | ||
Write-Error "Failed to disable Firewall Profiles: $_" | ||
exit 1 | ||
} | ||
|
||
# Download and Install Chrome Remote Desktop Host | ||
try { | ||
$remoteDesktopInstaller = "$env:TEMP\chromeremotedesktophost.msi" | ||
Write-Output "Downloading Chrome Remote Desktop Host..." | ||
Invoke-WebRequest -Uri 'https://dl.google.com/edgedl/chrome-remote-desktop/chromeremotedesktophost.msi' -OutFile $remoteDesktopInstaller | ||
Write-Output "Installing Chrome Remote Desktop Host..." | ||
Start-Process -FilePath $remoteDesktopInstaller -Wait | ||
Write-Output "Cleaning up installer..." | ||
Remove-Item -Path $remoteDesktopInstaller | ||
Write-Output "Chrome Remote Desktop Host installed successfully." | ||
} catch { | ||
Write-Error "Failed to install Chrome Remote Desktop Host: $_" | ||
exit 1 | ||
} | ||
|
||
# Download and Install Google Chrome | ||
try { | ||
$chromeInstaller = "$env:TEMP\chrome_installer.exe" | ||
Write-Output "Downloading Google Chrome..." | ||
Invoke-WebRequest -Uri 'https://dl.google.com/chrome/install/latest/chrome_installer.exe' -OutFile $chromeInstaller | ||
Write-Output "Installing Google Chrome..." | ||
Start-Process -FilePath $chromeInstaller -ArgumentList '/install' -Verb RunAs -Wait | ||
Write-Output "Cleaning up installer..." | ||
Remove-Item -Path $chromeInstaller | ||
Write-Output "Google Chrome installed successfully." | ||
} catch { | ||
Write-Error "Failed to install Google Chrome: $_" | ||
exit 1 | ||
} |