1

I'm working on my service(developed with C++).

I'm trying to make it start automatically in safe mode (all modes).

I've checked on the internet, I've tried the registry: \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal/Network

I added a new key with my service name and the value like this: (Default) = "Service", but didn't work.

Do I need to do something in my code? or in the installation (with the "sc" command)?

I would be glad to get more solutions to my problem.

3
  • Why would you want that? Windows 7 or Windows 10? If you want for it to work on both OS'es remove those tags and put them in your question.
    – CaldeiraG
    Dec 19, 2019 at 13:20
  • 1
    Welcome to SuperUser. Can you explain why you would want to do that? The whole point of Safe Mode is to only start the things that are essential for Windows to run.
    – Doug Deden
    Dec 19, 2019 at 15:24
  • Hey, thanks you for your answers, I updated the tags. I'm working on my project, and I'm doing some tests on safe mode. I know what is it safe mode, I want to start my service on safe mode for some tests.
    – shush
    Dec 22, 2019 at 14:28

1 Answer 1

1

CurrentControlSet\Control\SafeBoot\Minimal\Network\YourService

You may need to place (Default) = "Service"

@="Service"

inside the key of your newly placed service.

3
  • Hey, I'v tried it and still didn't work. There is something special with the "@=" ?
    – shush
    Dec 22, 2019 at 14:23
  • @shush this is the Default key in Windows registry. This is found after you create a key, it is on the right side where all the data of the key is found. This tells Windows that the item is a Service. If you didn't create the Service itself in registry then the service does not exist. Your service key must be same exact name as key created, capitals included.
    – vssher
    Dec 22, 2019 at 21:06
  • @shush this is an example only, of where your service should be kept (when created) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ACPI Note the services
    – vssher
    Dec 22, 2019 at 21:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .