File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ if(-not($OutPath.StartsWith('"')))
1616# Test if files are already there...
1717if ((Test-Path - Path " $OutPath \MSTSCLib.dll" ) -and (Test-Path - Path " $OutPath \AxMSTSCLib.dll" ))
1818{
19- Write-Host " MSTSCLib.dll and AxMSTSCLib.dll already created !"
19+ Write-Host " MSTSCLib.dll and AxMSTSCLib.dll already there !"
2020 return
2121}
2222
@@ -29,18 +29,22 @@ if([String]::IsNullOrEmpty($ProgramFiles_Path))
2929}
3030
3131# Get aximp from sdk
32- $files = (Get-ChildItem - Path " $ProgramFiles_Path \Microsoft SDKs\Windows" - Recurse - Filter " aximp.exe" - File)
32+ $AximpPath = (( Get-ChildItem - Path " $ProgramFiles_Path \Microsoft SDKs\Windows" - Recurse - Filter " aximp.exe" - File) | Sort-Object FullName | Select-Object - First 1 ).FullName
3333
34- if ($files .Count -eq 0 )
34+ if ([ String ]::IsNullOrEmpty( $AximpPath ) )
3535{
3636 Write-Host " Aximp.exe not found on this system!"
37- exit 2
37+ return
38+ }
39+ else
40+ {
41+ Write-Host " Using aximp.exe form: $AximpPath "
3842}
3943
4044# Change location
4145Write-Host " Change location to: $OutPath "
4246Set-Location - Path $OutPath
4347
4448# Create MSTSCLib.dll and AxMSTSCLib.dll
45- Write-Host " Creating MSTSCLib.dll and AxMSTSCLib.dll ..."
46- Start-Process - FilePath $files [ $files .Length -1 ].FullName - ArgumentList " $ ( $Env: windir ) \system32\mstscax.dll" - Wait - NoNewWindow
49+ Write-Host " Build MSTSCLib.dll and AxMSTSCLib.dll ..."
50+ Start-Process - FilePath $AximpPath - ArgumentList " $ ( $Env: windir ) \system32\mstscax.dll" - Wait - NoNewWindow
You can’t perform that action at this time.
0 commit comments