[ https://issues.apache.org/jira/browse/NIFI-14458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943298#comment-17943298 ]
Phil Dicke edited comment on NIFI-14458 at 4/10/25 4:40 PM: ------------------------------------------------------------ For those looking to use ProcRun to create a windows service, I've attached install_service_exe.bat SRV_BIN is prunsrv.exe downloaded from [https://downloads.apache.org/commons/daemon/binaries/windows/] renamed to nifi-service.exe and copied into %NIFI_HOME%\bin Copy install_service_exe.bat file into %NIFI_HOME%\bin as well and run it to install the service {code:java} sc delete nifi-service{code} can be used to remove the service was (Author: philci52): For those looking to use ProcRun to create a windows service, I've attached install_service_exe.bat SRV_BIN is prunsrv.exe downloaded from [https://downloads.apache.org/commons/daemon/binaries/windows/] renamed to nifi-service.exe and copied into %NIFI_HOME%\bin Copy install_service_exe.bat file into %NIFI_HOME%\bin as well and run it to install the service `sc delete nifi-service` can be used to remove the service > Cannot use nifi.cmd to start nifi process in the foreground > ----------------------------------------------------------- > > Key: NIFI-14458 > URL: https://issues.apache.org/jira/browse/NIFI-14458 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework > Affects Versions: 2.3.0 > Environment: Windows 10, java 21 > Reporter: Phil Dicke > Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > The current nifi.cmd script, cannot be used to start nifi in the foreground. > The script checks for the "start" command and launches the process in the > background. > While this is convenient for using a typical shell user, it does not work for > integrating the Apache ProcRun ( > [https://commons.apache.org/proper/commons-daemon/procrun.html] ) and running > the application as a Windows Service using exe mode. > Obviously, I can just copy and edit nifi.cmd to start the processes in the > foreground, but I would prefer a more elegant solution. > I'm proposing that I add a new command "startfg" to the nifi.cmd that will > start the nifi process in the foreground. I'd like to get some feedback > before I implement this. Is there a better option? > [~exceptionfactory] -- This message was sent by Atlassian Jira (v8.20.10#820010)