-
Notifications
You must be signed in to change notification settings - Fork 1
/
prolint.ps1
33 lines (25 loc) · 1.01 KB
/
prolint.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Add-Type -AssemblyName System.Windows.Forms
$NetVersion=(Get-ChildItem -Path "REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\" | where {$_.Name -like "*v4*"})
if (!$NetVersion)
{
[System.Windows.Forms.MessageBox]::Show(".Net Framework v4.0 or higher is required to start this program!")
Exit
}
$ProKeyEntry = (Get-ChildItem -Path REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\PSC\Progress | where {$_.Name -like "*11.*"}).Name
if ($ProKeyEntry -is [array]) {$ProKeyPath = $ProKeyEntry[0]}
else {$ProKeyPath = $ProKeyEntry}
if (!$ProKeyPath)
{
[System.Windows.Forms.MessageBox]::Show("Progress version 11 was not found!")
Exit
}
$ProKeyPath = "REGISTRY::" + $ProKeyPath
$DLC=(Get-ItemProperty -Path $ProKeyPath).installPath
$CurDir=(Get-Item -Path ".").FullName
$Env:DLC=$DLC
$Env:PROPATH=$CurDir + "," + $CurDir + "/Prolint.pl"
$Cmd=$DLC + "\bin\prowin.exe"
$Proc="Prolint/launch.r"
$PF=$CurDir + "/prolint.pf"
if ($args[0]) {$ProParam="-param"}
& $Cmd "-p" $Proc -pf $PF $ProParam $args[0]