[Vm-dev] OSProcess working directory under Windows

David T. Lewis lewis at mail.msen.com
Wed Feb 8 17:38:40 UTC 2017


The Windows implementation of OSProcess is not very complete, and is much
less useful than the Unix/Linux/OS X implementation. That said, if you
also load CommandShell with OSProcess, you may find the path support there
to be of some interest. It maintains a "current working directory" for C:,
D:, ... more or less like Windows does.

Dave


>
> Now that my e-mail finally made it to the list, I should add that I
> have found a workaround in the meantime:
>
>     OSProcess command: 'cmd /C start /D "', theWorkingDirectoryPath,
> '" ', theCommand
>
> But it pops up a console window briefly and does not look very elegant.
>
> 2017-02-07 16:15 GMT+01:00 Jakob Reschke <jakob.reschke at student.hpi.de>:
>> Hi,
>>
>> Is it true that the Windows version the of OSProcess plugin does not
>> support running a process in a different directory than the one in
>> which the VM itself runs?
>>
>> I found primGetCurrentWorkingDirectory, but no setter equivalent.
>>
>> There are accessors for pwd in ExternalWindowsOSProcess, but the value
>> is never used. Disappointing decoy...
>>
>> The two primitives calling CreateProcess only supply NULL for the
>> lpCurrentDirectory parameter.
>>
>> Have I missed something? I could not imagine that the requirement to
>> run a process in another directory under Windows did never arise for
>> anybody.
>>
>> Kind regards,
>> Jakob
>




More information about the Vm-dev mailing list