- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Run script in powershell
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Run script in powershell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Run script in powershell
I've been using environment variables; just set it in powershell then get it in JSL.
Vince Faller - Predictum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.