cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

Run script in powershell

vince_faller
Super User (Alumni)

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.