ARMS Uploader
This commit is contained in:
38
BodyshopUploader/Utils/Scripts/ArmsExport.ps1
Normal file
38
BodyshopUploader/Utils/Scripts/ArmsExport.ps1
Normal file
@@ -0,0 +1,38 @@
|
||||
#Verify that the partner is running. If not, strat it.
|
||||
|
||||
if((Get-Process -Name ImEXOnlinePartner -ErrorAction SilentlyContinue) -eq $null){
|
||||
& "$Env:USERPROFILE\AppData\Local\ImEXOnlinePartner\ImEXOnlinePartner.exe"
|
||||
}
|
||||
|
||||
$PSversion = $PSVersionTable.PSVersion.Major
|
||||
|
||||
|
||||
function v2 {
|
||||
# Post request to the partner to trigger the export.
|
||||
Invoke-WebRequest -Uri http://localhost:1337/arms/rodata/ -Method POST
|
||||
#Start the Arms Uploader.
|
||||
#Start-Process -FilePath "C:\ImEX\Applications\ARMSUploader\ROUpload.exe"
|
||||
}
|
||||
|
||||
function v1 {
|
||||
WebRequest = [System.Net.WebRequest]::Create("http://localhost:1337/arms/rodata/")
|
||||
WebRequest.Method = "POST"
|
||||
WebRequest.ContentType = "application/json"
|
||||
Response = $WebRequest.GetResponse()
|
||||
ResponseStream = $Response.GetResponseStream()
|
||||
ReadStream = New-Object System.IO.StreamReader $ResponseStream
|
||||
#Data=$ReadStream.ReadToEnd()
|
||||
#Start the Arms Uploader.
|
||||
Start-Process -FilePath "C:\ImEX\Applications\ARMSUploader\ROUpload.exe"
|
||||
}
|
||||
|
||||
|
||||
Switch ($PSversion) {
|
||||
1 {v1}
|
||||
2 {v1}
|
||||
4 {v2}
|
||||
5 {v2}
|
||||
6 {v2}
|
||||
7 {v2}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user