Tyron Govender created MINIFI-555:
-------------------------------------

             Summary: Errors during service install & service delete on Windows
                 Key: MINIFI-555
                 URL: https://issues.apache.org/jira/browse/MINIFI-555
             Project: Apache NiFi MiNiFi - MOVED TO NIFI PROJECT
          Issue Type: Bug
            Reporter: Tyron Govender
         Attachments: image-2023-08-15-11-47-29-532.png, 
image-2023-08-15-11-48-22-552.png, image-2023-08-15-11-49-17-005.png, 
image-2023-08-15-11-51-46-784.png, image-2023-08-15-11-52-27-879.png

When trying to install Minifi as a Windows service, the batch scripts only work 
when they are run from the directory containing the batch scripts.

When being run from another directory, they do not correctly figure out the 
correct path to minifi.exe or to other related batch scripts, such as 
minifi-env.bat

!image-2023-08-15-11-47-29-532.png!

vs

!image-2023-08-15-11-48-22-552.png!

and the service is created correctly in the second case:

!image-2023-08-15-11-49-17-005.png!

 

This fix is required because I am writing an installer, but when running the 
batch script in this automated manner, and calling other batch scripts, the 
command line environment cannot find the called script (minifi-env.bat is 
called from install-service.bat)

A simple solution is to change this:

!image-2023-08-15-11-51-46-784.png!

To this:

!image-2023-08-15-11-52-27-879.png!

basically using `%~dp0` in the path when trying to run `minifi-env.bat` or 
`minifi.exe`

Which makes the assumption that these file paths are all in the same directory 
(they are, at the moment, and I see no reason for this to change)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to