cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
vince_faller
Super User (Alumni)

Run script in powershell

So in cmd I can run 

jmp.exe C:\script.jsl

and it will open JMP and run the script.  Anyone know how to do the same in powershell?

I tried

Start-Process -FilePath "C:\Program Files\SAS\JMPPRO\14\jmp.exe" -ArgumentList "C:\script.jsl"

With no luck. 

Vince Faller - Predictum
1 ACCEPTED SOLUTION

Accepted Solutions
vince_faller
Super User (Alumni)

Re: Run script in powershell

never mind.  I found it.  

& "jmp.exe" "C:\script.jsl"
Vince Faller - Predictum

View solution in original post

4 REPLIES 4
vince_faller
Super User (Alumni)

Re: Run script in powershell

never mind.  I found it.  

& "jmp.exe" "C:\script.jsl"
Vince Faller - Predictum
miguello
Level VI

Re: Run script in powershell

Actually what you wrote should work.

I use this:

$JMP_path = "C:\Program Files\SAS\JMP\15\Jmp.exe"
$JMPScriptPath = 'C:\MyScript.jsl'
Start-Process -FilePath $JMP_path -ArgumentList ("`""+$JMPScriptPath+"`"") -Wait

What I would like to add to this is to pass another variable into the script. Any idea how to do that?

vince_faller
Super User (Alumni)

Re: Run script in powershell

I've been using environment variables; just set it in powershell then get it in JSL. 

Vince Faller - Predictum
miguello
Level VI

Re: Run script in powershell

Yes, I ended up doing the same thing. I create a ENV variable (it is local to that PowerShell session I believe) and immediately ready it with JMP that is launched from the same PowerShell session.