Replies: 6 comments 3 replies
-
How to Run a Command-Line Tool in Windows and Keep It Running in the BackgroundTo run a command-line tool in Windows and keep it running in the background after closing the terminal, you can use one of the following methods: Method 1: Using
|
Beta Was this translation helpful? Give feedback.
-
Have you tried these methods with DNSCrypt-Proxy.exe yourself? All your methods start it, but DNSCrypt-Proxy.exe terminates itself as soon as CLI is closed, regardless of whether its CMD or PS. |
Beta Was this translation helpful? Give feedback.
-
Try the Task Scheduler method, then: Open Task Scheduler. This method makes dnscrypt-proxy independent of the terminal. |
Beta Was this translation helpful? Give feedback.
-
I answered a similar question before: lifenjoiner/pd#9 (comment) .
@echo off
setlocal EnableDelayedExpansion
set argv=%*
if "%~1"=="" (
set argv=%~dpn0.exe
)
set argv=!argv:\=\\\\!
set argv=!argv: =%%20!
mshta javascript:new%%20ActiveXObject('Wscript\.Shell').Run('!argv!',0);close() |
Beta Was this translation helpful? Give feedback.
-
That's great, but is there some way to do it without relying on other tools? MSHTA is an obsolete component frequently removed for safety reasons. |
Beta Was this translation helpful? Give feedback.
-
My first solution is multi-functional.
|
Beta Was this translation helpful? Give feedback.
-
I want to just start DNSCrypt-Proxy and keep it running without installing it as a service, but I don't want CMD box to continue running in the background on desktop or even minimized. I want it closed, out-of-sight, but not close DNSCrypt-Proxy process. How can I do that? So far only installating DNSCrypt-Proxy as service allows for that...
Beta Was this translation helpful? Give feedback.
All reactions