Boincmgr or Command Line Bad Behavior

crashtech

Lifer
Jan 4, 2013
10,659
2,263
146
I have a batch file in Windows that has this as its last line:

Code:
"C:\Program Files\BOINC\boincmgr.exe" /m /n 127.0.0.1 /g 31418 /p (secret password redacted)

Normally I would have an "exit" command after that so the terminal window would automatically go away, but it seems that the terminal window always becomes unresponsive after running the above command, so it does not matter what command is placed after it, nothing works. Anyone know why this is happening?
 

StefanR5R

Elite Member
Dec 10, 2016
6,391
9,854
136
I don't know why this happens. Does the terminal window become responsive again when you quit the boincmgr?

What if you add -nd or /nd (alias --no-daemon)?

When I used boincmgr on Windows, I started it through shortcuts, not through batch files.
 

crashtech

Lifer
Jan 4, 2013
10,659
2,263
146
I don't know why this happens. Does the terminal window become responsive again when you quit the boincmgr?

What if you add -nd or /nd (alias --no-daemon)?

When I used boincmgr on Windows, I started it through shortcuts, not through batch files.
Well, /nd does something, it causes boincmgr to say it is "disconnected" in the lower right corner, and it just sits there like that. When boincmgr is quit, the terminal window disappears.
 

lane42

Diamond Member
Sep 3, 2000
5,721
624
126
crashtech, I have no idea what that is, but isn't \Boinc run in
C\program Data\
 

Markfw

Moderator Emeritus, Elite Member
May 16, 2002
26,951
15,931
136
He is an odd, possibly related thing.... If I get a situation where the BOINC manager says disconnected, and stays that way for a while, the only way to fix it is to do "file/shut down connected client". Then almost instantly, it connects.

Very odd....
 

crashtech

Lifer
Jan 4, 2013
10,659
2,263
146
Well, I don't think I can do what I want with a shortcut. Here's the entire contents of the batch file, which I used to run as two separate files:
Code:
"c:\Program Files\BOINC\boinc.exe" --allow_multiple_clients --redirectio --detach_console --gui_rpc_port 31418 --dir C:\ProgramData\BOINC2 

TIMEOUT 12

"C:\Program Files\BOINC\boincmgr.exe" /m /n 127.0.0.1 /g 31418 /p (secret password redacted) 

EXIT

The "EXIT" doesn't do anything, I just include it to indicate my intentions. It's fine to have to close the window manually, but it seems that there should be a better way. The second part of the batch always stuck with the terminal window open even when run separately, while the first part would run and then close the window automatically.
 

StefanR5R

Elite Member
Dec 10, 2016
6,391
9,854
136
I don't think I can do what I want with a shortcut.
boincmgr can be used to start boinc (even with custom parameters handed through to boinc). That is, you could use a shortcut to start boincmgr which starts boinc. That's the theory; I never tried it myself.

It's fine to have to close the window manually, but it seems that there should be a better way. The second part of the batch always stuck with the terminal window open even when run separately, while the first part would run and then close the window automatically.
I don't know Windows CMD very well. But perhaps these discussions include some useful info:
https://stackoverflow.com/questions...indows-console-and-then-make-it-detach-itself
https://stackoverflow.com/questions...command-line-without-opening-a-new-cmd-window
 

biodoc

Diamond Member
Dec 29, 2005
6,316
2,240
136
I just use one boinc manager and connect to clients using IPaddress:portnumber format and then password. Running multiple managers steals valuable cpu cycles. :)

port.png
 

crashtech

Lifer
Jan 4, 2013
10,659
2,263
146
@biodoc , thanks I will add that to the long list of better procedures that I haven't implemented! Number one is to migrate all my crunching rigs to Linux. My current plan for that is to build a completely separate desktop PC running Linux, and get a KVM to switch between them.

As to my little topic, adding START "" before the second part gets me the behavior I wanted, like this:

Code:
"c:\Program Files\BOINC\boinc.exe" --allow_multiple_clients --redirectio --detach_console --gui_rpc_port 31418 --dir C:\ProgramData\BOINC2

TIMEOUT 10

START "" "C:\Program Files\BOINC\boincmgr.exe" /m /n 127.0.0.1 /g 31418 /p (secret password redacted)

EXIT