windows: cleanup script after install

This commit is contained in:
Koushik Dutta
2023-02-09 20:45:53 -07:00
parent 713d654140
commit 27c883f396

View File

@@ -46,7 +46,7 @@ $SERVICE_JS_ESCAPED_PATH = $SERVICE_JS_PATH.replace('\', '\\')
$SERVICE_JS | Out-File -Encoding ASCII -FilePath $SERVICE_JS_PATH
Write-Output "Scrypted service will run as user $($env:USERNAME). Password is required for service setup."
$env:PASSWORD = Read-Host -Prompt "Enter password for $($env:USERNAME)" -MaskInput
$env:PASSWORD = Read-Host -Prompt "Enter password for $($env:USERNAME)"
$INSTALL_SERVICE_JS = @"
const Service = require('node-windows').Service;
@@ -92,6 +92,7 @@ $INSTALL_SERVICE_JS_PATH = $SCRYPTED_HOME + '\install-service.js'
$INSTALL_SERVICE_JS | Out-File -Encoding ASCII -FilePath $INSTALL_SERVICE_JS_PATH
node $INSTALL_SERVICE_JS_PATH
del $INSTALL_SERVICE_JS_PATH
Write-Output "Scrypted is now running at: https://localhost:10443/"
Write-Output "Note that it is https and that you'll be asked to approve/ignore the website certificate."