<div dir="ltr"><div dir="ltr">The correct way to load FFI is to load it from SqueakMap, update, in the mid left panel bring up the menu and unselect "New safely-available packages", and then install head.  Answer yes to installling something not compatible with your current system (it is, just the map package hasn't been changed to say it is compatible).<div><br></div><div>Once this is finished, FFI will be loaded.</div><div><br></div><div>At this point, you still need to load the Win32 extentions.  Open the Monticello Browser, click in the repository panel on the right, choosing "<a href="http://source.squeak.org/FFI">http://source.squeak.org/FFI</a>".  Open this repostiory.  In this repository, choose the "FFI-Win32" package.  Pick the latest package (currently FFI-Win32-nice.12.mcz) and load it.</div><div><br></div><div>At this point Ron's example should work.  This will definitely work in a 5.2 image.</div><div><br></div><div>Now, Ron's example will either run the program will no results, or will error out if it can't run, I believe.  Try it out first and see if it works for you.</div><div><br></div><div>If it doesn't, then maybe my exmaple (the is just an extension of what Ron stated) will work:</div><div><br></div><div><div>scanScript := ByteString streamContents: [:bs|</div><div><span style="white-space:pre">        </span>bs nextPutAll: 'my.exe > output.txt'); cr; lf.</div><div><span style="white-space:pre">     </span>bs nextPutAll: 'del '; nextPutAll: (fn := 'Scan', serverName, '.bat').</div><div><span style="white-space:pre">        </span>].</div><div>file := FileStream newFileNamed: fn.</div><div>[file nextPutAll: scanScript] ensure: [file close].</div><div>Win32Shell new shellExecute: fn.  "execute runs without opening the program window..."</div><div>dir := FileDirectory default.</div><div>[dir fileExists: fn] whileTrue: [(Delay forSeconds: 1) wait].</div><div>file := FileStream oldFileNamed: 'output.txt'.</div><div>raw := file contentsOfEntireFile. "closes file"</div><div>dir deleteFileNamed: outFn.</div><div>"Do something with raw - the results of the program my.exe"</div></div><div><br></div><div>Of course, this should all just work with ProcessWrapper, but I switched away from that a few years ago - I don't remember why.  Maybe I wanted lots of concurrent programs running at once.</div><div><br></div><div>-cbc</div><div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 27, 2018 at 12:24 PM John-Reed Maffeo <<a href="mailto:jrmaffeo@gmail.com">jrmaffeo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ron,<div>Thanks for the suggestion, however it did not work for me on a 5.2 image or a 4.1 image that I downloaded so I could test in the version you are using.</div><div><br></div><div>I verified that I have the shell.dll file, but I don't see FFI or Win32Shell in either image.</div><div>I can't find any useful documentation about Win32Shell.</div><div>Web searches indicate that I might want to try loading Alien so I will give that a try and see what happens.</div><div><br></div><div>jrm</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 26, 2018 at 12:50 PM Ron Teitelbaum <<a href="mailto:ron@usmedrec.com" target="_blank">ron@usmedrec.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default">Hi JRM,</div><div class="gmail_default"><br></div><div class="gmail_default">Not sure how it's done today but on my 4.1 system, we do the following.</div><div class="gmail_default"><br></div><div class="gmail_default">result := Win32Shell new shellOpen: 'my.exe'.<br></div><div class="gmail_default"><br></div><div class="gmail_default">It uses FFI and shell32.dll</div></div><div><br></div><div><div class="gmail_default" style="font-size:small">All the best,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Ron Teitelbaum</div><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 26, 2018 at 2:48 PM John-Reed Maffeo <<a href="mailto:jrmaffeo@gmail.com" target="_blank">jrmaffeo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">I have an application running on Mac which I am trying to port to run on Windows.<br><div><br></div><div>PipeableOSProcess fails on an know issue.</div><div><br></div><div>Is Process Wrapper a viable option? It requires adding   SmartSyntaxInterpreterPlugin, and ProcessWrapperPlugin.dll. </div><div><br></div><div>All I want to do is run an .exe and capture the output.</div><div><br></div><div>Any suggestions?</div><div><br></div><div>- jrm</div></div></div></div></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div>