[ 
https://issues.apache.org/jira/browse/DAEMON-454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Thomas resolved DAEMON-454.
--------------------------------
    Resolution: Not A Problem

You'll need to configure your service to start in safe mode. See 
[https://superuser.com/questions/1497924/how-to-disable-certain-services-from-running-in-safe-mode-but-run-in-normal-boot]
 for an example of how to do this.

> Error 1084 in windows safe mode
> -------------------------------
>
>                 Key: DAEMON-454
>                 URL: https://issues.apache.org/jira/browse/DAEMON-454
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: prunsrv
>    Affects Versions: 1.3.3
>         Environment: java 19.0.2
> prunsrv 1.3.3 
> Windows 10 19043.928
>  
>            Reporter: Baris
>            Priority: Major
>         Attachments: 2023-03-08 15-32-14.mkv, Untitled.png, 
> WinverUntitled.png, commons-daemon.2023-03-08.log, jnaReg.rar
>
>
> Hi , I was trying to run a windows service under safe mode of windows. 
> Unfortunately I got 1084 error. I added my java project as jnaReg.rar . I 
> tried commenting out this part in my code but no avail:
> ```
> // public static void registerHandler(){
> // Winsvc.SERVICE_STATUS_HANDLE service_status_handle = 
> Advapi32.INSTANCE.RegisterServiceCtrlHandlerEx("hvldlpxpa", new 
> Winsvc.HandlerEx() {
> // @Override
> // public int callback(int i, int i1, Pointer pointer, Pointer pointer1) {
> // System.out.println(i);
> // if(i == 1){
> // return 1;
> // }
> // return 120;
> // }
> // }, Pointer.NULL);
> // }
> ```
> Using java 19, prunsrv 1.3.3 . 
> My typical register command is :
> ````
> prunsrv.exe //IS/Test --DisplayName=xpa --Description=h --Startup=manual 
> --Jvm="pathToJvmDll" 
> --Classpath=C:\Users\bunsal\IdeaProjects\jnaReg\target\JNA-jar-with-dependencies.jar
>  --StartClass=Main --StopClass=Main --StartMode=jvm --StopMode=jvm 
> --StopMethod=stopService --StartMethod=main --LogLevel=Debug 
> --ServiceUser=LocalSystem 
> ````
> (Looks like default service user is changed from localsystem to local service 
> (compared to v1.1))
> Added commons-daemon log, and video of nothing being changed on windows event 
> viewer. 
> What should I do? 



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

Reply via email to