Skip to content

User Commands on Windows #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RSmain opened this issue May 1, 2025 · 1 comment
Open

User Commands on Windows #67

RSmain opened this issue May 1, 2025 · 1 comment

Comments

@RSmain
Copy link

RSmain commented May 1, 2025

Hi,

Thank you for this great software!

Just wanted to share an observation about user command scripting on Windows, which seems to have been a problem for some time: https://sourceforge.net/p/dar/mailman/dar-support/thread/20140430141912.A7CD.4698F931%40iol.ie/

With Process Monitor I figured out that you can get user commands to work by renaming the program's directory to "bin".

  • Initially it can be noticed that dar.exe is looking for the shell in the parent directory of the program folder (..) and then under ..\bin. So, my first try was to move the program directory to C:\cygwin of a parallel Cygwin installation.

  • That changes the error from "execve() failed. (process table is full ?)" to "returned error code: 32512" when sh.exe is found in C:\cygwin\bin.

  • Copying the DAR program files into C:\cygwin\bin worked, but copying the C:\cygwin\bin files to a DAR program directory didn't work (error 32512). It took me a while to test out the only difference: the directory name.

  • Then I confirmed that you don't need other Cygwin resources, installing DAR into "bin" is the only adjustment required.

For error 32512, I can't find any suspicous fails in Process Explorer. That's why I guess it's probably a Cygwin error that makes sh.exe unusuable outside a bin directory.
But it could be addressed by a FAQ or the packaging of the Windows release.

Best,
RS

@RSmain
Copy link
Author

RSmain commented May 1, 2025

The findings above were a bit premature, since I got confused by my test setup.

In fact, you need at least this folder structure with sh.exe and additional Cygwin libraries to run a simple "echo test" user command wihtout errors:

<DAR main dir>\bin\<all DAR for Windows files>
<DAR main dir>\bin\sh.exe
<DAR main dir>\bin\cygreadline7.dll
<DAR main dir>\bin\cygncursesw-10.dll
<DAR main dir>\tmp

It appears that e.g. a "sleep" would also require sleep.exe from Cygwin, so I tend to integrate all files from Cygwin's bin directory with my DAR install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant