Skip to content

Commit 929e4e9

Browse files
Scott DoverScott Dover
authored andcommitted
chore: move itc script to ps1 file
1 parent 6e8feb2 commit 929e4e9

File tree

7 files changed

+226
-972
lines changed

7 files changed

+226
-972
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"editor.insertSpaces": true,
55
"editor.formatOnSave": true,
66
"typescript.tsc.autoDetect": "off",
7-
"typescript.preferences.quoteStyle": "single"
7+
"typescript.preferences.quoteStyle": "single",
8+
"[powershell]": {
9+
"editor.defaultFormatter": "ms-vscode.powershell"
10+
}
811
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
function GetInteropDirectory {
2+
# try to load from user specified path first
3+
if ("$($global:interopLibraryFolderPath)") {
4+
if (Test-Path -Path "$($global:interopLibraryFolderPath)\\SASInterop.dll") {
5+
return "$($global:interopLibraryFolderPath)"
6+
}
7+
}
8+
9+
# try to load path from registry
10+
try {
11+
$pathFromRegistry = (Get-ItemProperty -ErrorAction Stop -Path "HKLM:\\SOFTWARE\\WOW6432Node\\SAS Institute Inc.\\Common Data\\Shared Files\\Integration Technologies").Path
12+
if (Test-Path -Path "$pathFromRegistry\\SASInterop.dll") {
13+
return $pathFromRegistry
14+
}
15+
} catch {
16+
}
17+
18+
# try to load path from integration technologies
19+
$itcPath = "C:\\Program Files\\SASHome\\x86\\Integration Technologies"
20+
if (Test-Path -Path "$itcPath\\SASInterop.dll") {
21+
return $itcPath
22+
}
23+
24+
return ""
25+
}
26+
27+
Export-ModuleMember -Function GetInteropDirectory

0 commit comments

Comments
 (0)