New
#1
Help with the creation of a (to me) complicated bat file
Hi people! I have a pretty complicated (to me) task to accomplish.
I have a notebook with Windows 10 64 bit turned into a media-retrogaming living room PC.
I use both emulators, old pc games and Steam games. I use two Playstation 3 controllers, connected with a bluetooth dongle and managed by the mighty ScpToolkit in order to emulate an Xbox360 controller. Why? Because I'm using both emulators and Steam games. Steam games only work with an Xbox360 controller and I didn't want to buy a new pair.
Ok, let's move on. ScpToolkit needs a service to run properly but I don't want it to start everytime I start the pc, simply because I only need it when I play some games. And it makes the bluetooth dongle bling like a Christmas tree.
So, I have created a bat file to instantly launch the Ds3Service by writing: sc start "Ds3Service". It works like a charm, but I have to run it as an administrator and click the UAC prompt. First world problems.
Now here comes the real deal. I would like to create a bat file that launches firtst "Ds3Service_Start.cmd" as administrator (or the process itself withouth having to create a reserved cmd), with no UAC prompt, NO cmd window visible and with the capability of turning the cmd off after it ran. Than after the process is running and the cmd closed, the bat file should start Emulationstation.exe.
I have already done some homework and I followed this guide to created an eleveted program shortcut. What I cannot do, even after reading the comment below, is to make the whole thing completely silent and to let it close itself.
Here's what I get after running the shortcut created following the guide:
C:\Windows\system32>sc start "Ds3Service"
NOME_SERVIZIO: Ds3Service
TIPO : 10 WIN32_OWN_PROCESS
STATO : 2 START_PENDING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
CODICE_USCITA_WIN32 : 0 (0x0)
CODICE_USCITA_SERVIZIO : 0 (0x0)
PUNTO_CONTROLLO : 0x0
INDICAZIONE_ATTESA : 0x0
PID : 4028
FLAG :
C:\Windows\system32>
and the cmd window stays there. I have tried to create a bat file with this inside:
@echo off
Start /MIN "" C:\Windows\System32\schtasks.exe /run /tn "Ds3Service_Start"
exit
With no luck. It correctly and instantly starts the process with no UAC prompt, but that window doesn't go away.
Eternal glory to the super kind man who will be able to help me :)