Batch to find service with special character

2

I'm trying to make a batch to connect a Windows service that has a special character "Ç", but I could not get into any viable code. I always get the 1060 error.

This is more or less the structure of my bat:

SC QUERY "Serviço Bonjour" > NUL
IF ERRORLEVEL 1060 GOTO MISSING_BONJOUR
ECHO Configurando AutoStart do Bonjour...
sc config "serviço do bonjour" start=auto
sc start "serviço do bonjour"
GOTO END

In the example above I have tried several other mechanisms, including substring, but I was not successful

    
asked by anonymous 13.10.2015 / 15:22

2 answers

3

Depending on your command you are picking up the " EXIT_NAME ", but if you pick up the " SERVER_NAME " you will have no problems.

Example:

SERVER_NAME: DPS

SYMPTOMS_NAME: Health

Thus resulting the following command to start the service:

sc config "DPS" start=auto
sc start "DPS"
    
16.10.2015 / 22:05
0

Once I needed to do a bat to configure network card, I do not handle anything but copying well hehe. I had problem with accentuation and found that I need to change these characters for another, it follows a list. That's the way.

  

Quote

     

á =

to = ...

ã = Æ

ä="

â = ƒ

A = μ

À = ·

à = Ç

Ä = Ž

 = ¶

is =,

è = Š

ë = ‰

ê =

E =

È = Ô

Ë = Ó

Ê = Ò

i = ¡

ì =

= =

î = Œ

Í = Ö

Ì = Þ

Ï = Ø

Î = =

or = ¢

ò = •

õ = ä

ö="

ô="

O = a

Ò = ã

Õ = å

Ö = ™

Ô = â

ú = £

ù = -

ü =

û = -

Ú = é

Ù = ë

Ü = š

Û =

14.10.2015 / 01:18