Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Windows 2019

Windows 2019 #1

Workflow file for this run

name: Windows 2019
on: workflow_dispatch
jobs:
build:
runs-on: windows-2019
timeout-minutes: 360
steps:
- name: Getting Files Ready
run: |
Invoke-WebRequest https://storage.curvee.eu.org/ngrok-windows-amd64-v3.zip -OutFile ngrok.zip
Invoke-WebRequest https://storage.curvee.eu.org/start-2019.bat -OutFile start.bat
Invoke-WebRequest https://storage.curvee.eu.org/wallpaper.png -OutFile wallpaper.png
Invoke-WebRequest https://storage.curvee.eu.org/wallpaper.bat -OutFile wallpaper.bat
Invoke-WebRequest https://storage.curvee.eu.org/loop.bat -OutFile loop.bat
- name: Extracting Ngrok File
run: Expand-Archive ngrok.zip
- name: Connect to Ngrok.
run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN
env:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
- name: Enabling access to RDP.
run: |
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name "fDenyTSConnections" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name "UserAuthentication" -Value 1
copy wallpaper.png C:\Users\Public\Desktop\wallpaper.png
copy wallpaper.bat C:\Users\Public\Desktop\wallpaper.bat
- name: Start Ngrok and Loop
run: |
.\ngrok\ngrok.exe tcp --region ap 3389 &
cmd /c loop.bat