summaryrefslogtreecommitdiff
path: root/scripts/setup/windows/post_inst.ps1
blob: d8013da5bc025b244621d13465c554ac5905cfc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Execute uninstall script, attempt to remove leftover PROFILE entries
. ".\post_uninst.ps1"

# Calculate directories
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$parentDir = Split-Path -Parent $scriptDir

# Write configuration to PROFILE
Add-Content -Path $PROFILE -Value "# JustEnoughVCS - Begin #"
Add-Content -Path $PROFILE -Value ". `"$parentDir\jvn.ps1`""
Add-Content -Path $PROFILE -Value "# JustEnoughVCS - End #"

# Check dependencies, if OpenSSL is not found, show a prompt
try {
    $null = Get-Command openssl -ErrorAction Stop
} catch {
    $wshell = New-Object -ComObject Wscript.Shell
    $wshell.Popup("OpenSSL was not found on your computer. JustEnoughVCS key generation depends on OpenSSL.", 0, "JustEnoughVCS Installation", 0x0 + 0x30)
}