I have written a vb.net wrapper around the storescp.exe executable and it uses the --execonreception command line argument. The command I am executing is:
storescp.exe -v 105 -od "C:\Data\Images\Source" -fe .dcm -xf "C:\OFFISDICOM\storescp.cfg" DEFAULT --fork --exec-on-reception "C:\OFFISDICOM\AddDicomReceipt.bat #f #a"
The batch file executes an osql command to store the calling AE title and filename for later use. This command works consistantly from the command line, including the execonreception portion. However, when it is started from my wrapper application the execonreception command is executed only intermittently - all other aspects of the call execute proprly (i.e. file is received and stored, but AddDicomReceipt.bat may or may not execute).
The wrapper application is written in vb.net and launches the process as follows:
Dim prcStartInfo As System.Diagnostics.ProcessStartInfo = Nothing
Dim prcEcho As System.Diagnostics.Process = Nothing
prcStartInfo = New System.Diagnostics.ProcessStartInfo(strExecutableFilePathToStorescp.exe, strCommandLineArguments) 'see command above
prcStartInfo.WindowStyle = Diagnostics.ProcessWindowStyle.Hidden
prcStartInfo.CreateNoWindow = False
prcStartInfo.RedirectStandardOutput = True
prcStartInfo.RedirectStandardError = True
prcStartInfo.UseShellExecute = False
prcStartInfo.WorkingDirectory = strExecutableFilePath.Substring(0, strExecutableFilePath.LastIndexOf("\"))
prcEcho = System.Diagnostics.Process.Start(prcStartInfo)
Are there any known issues with the execonreception option, particularly when used with --fork? Does anyone have any suggestions to an alternate way to wrap storescp.exe and use the execonreception command?
Thanks
Storescp.exe - ExecOnReception command executes intermittently
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
As far as I can remember, --fork and --exec-on-reception should work on Windows systems since the command is executed for every new DICOM object received.
What does not work properly, is the combination of --fork and --exec/rename-on-eostudy. Therefore, we've added a check on this combination for the DCMTK 3.6.0 release. See the corresponding commit.
What does not work properly, is the combination of --fork and --exec/rename-on-eostudy. Therefore, we've added a check on this combination for the DCMTK 3.6.0 release. See the corresponding commit.
Right. I was thinking of the combination of --exec-on-eostudy and --fork
You mean this should work on non-Windows platforms? From my testing, and my reading of the code, this does not work on any platform. It would require some non-existent IPC mechanism. I'd be very happy to be wrong about this, though.
You mean this should work on non-Windows platforms? From my testing, and my reading of the code, this does not work on any platform. It would require some non-existent IPC mechanism. I'd be very happy to be wrong about this, though.
Re: Storescp.exe - ExecOnReception command executes intermit
Has this issue been fixed ? (the use of --exec-on-eostudy and --fork together)
Thanks
Thanks
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: Storescp.exe - ExecOnReception command executes intermit
Hi,
No, this is still a limitation. storescp prints an error if you try to start it with both options.
Best,
Michael
No, this is still a limitation. storescp prints an error if you try to start it with both options.
Best,
Michael
Who is online
Users browsing this forum: No registered users and 1 guest