-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInBasketStatus.ps1
More file actions
33 lines (31 loc) · 1011 Bytes
/
Copy pathInBasketStatus.ps1
File metadata and controls
33 lines (31 loc) · 1011 Bytes
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
function Get-ScriptDirectory{
# like https://blogs.msdn.microsoft.com/powershell/2007/06/19/get-scriptdirectory-to-the-rescue/
# this script wants to find files in the same folder
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
try {
Split-Path $Invocation.MyCommand.Path -ea 0
}
catch {
Write-Warning 'You need to call this function from within a saved script.'
}
}
# set location. include scripts, and set variables
$sd = Get-ScriptDirectory
Set-Location $sd
.\ExcelReport\Create-XamlInBasket.ps1 # function that implements the GUI
# create parameters to pass to XamlForm
$xamlFile = $sd + '\ExcelReport\XamlInBasket.xaml'
#$iom = $sd + '\v12SP3\iom.dll' # iom must match server service pack
$configFile = $sd + '\ExcelReport\config.xml'
# show the Xaml GUI
$Form = Create-XamlInBasket -sd $sd -xaml $xamlFile -configFile $configFile
try {
$Form.ShowDialog() | Out-Null
}
catch {
Write-Host $_
}
finally {
pause
$Form.Close()
}