help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: init Octave directly with files, using ps-scripts


From: Nell
Subject: Re: init Octave directly with files, using ps-scripts
Date: Tue, 12 Feb 2019 09:16:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello,

simple solution/workaround:

Start-Process -FilePath "${d}:\octave.vbs" -ArgumentList "--force-gui --persist --eval `"edit $args`"" -Wait

$args (e.g. a filename) will come from a another script/program.


#######################################


#
# Get AppVClient Package and Version ID
#

$a=Get-AppvClientPackage -name Octave.502

#
# Artificially shortpath as workaround while run into the 260 character limit for path/filenames # see https://stackoverflow.com/questions/34812349/how-can-i-query-a-temporary-ps-drive-while-returning-files-with-a-name-relative
#

$g="\\localhost\C$\ProgramData\App-V\$($a.packageid)\$($a.versionid)\Root"

#
# Get a free drive letter for create temporary persistent drives
#

$d=ls function:[d-z]: -n | ?{ !(test-path $_) } | random
$d = $d.substring(0,1)
$dum=New-psdrive -name $d -PSProvider FileSystem -Root $g -persist

#
# Run Octave and appent params including eval to open *.m files directly
#

Start-Process -FilePath "${d}:\octave.vbs" -ArgumentList "--force-gui --persist --eval `"edit $args`"" -Wait
#Laufwerk wieder entfernen
remove-psdrive -name $d -force

#######################################

This is just a modification or better a kind of wrapper around the original octave eviroment in AppV5 context.

Sincerely,
Erik Nell

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]