-2

I am trying to enable Files and printer sharing from command line, after some googling I found that the right command to achieve this:

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes

This seems to be ok if the Windows language is English. However, in my French Windows this is the result from an administrative command prompt:

Aucune règle ne correspond aux critères spécifiés.

I've also tried this command line:

netsh advfirewall firewall set rule group="Partage de fichiers et d'imprimantes" new enable=yes

but it didn't work as well and I got the same result as well:

Aucune règle ne correspond aux critères spécifiés.
user987530
  • 63
  • 6
  • All else failing, maybe try to change the default language to English, run the command that works, then change back to French. P.S. Your question may get better answers on the sister site [superuser.com](http://superuser.com/) which is about *usage* rather than *programming*. – dxiv Aug 20 '16 at 03:59
  • 1
    I don't understand why this isn't a programming question as am dealing with some difficulties to write my script , but the question is posted in http://superuser.com – user987530 Aug 20 '16 at 08:47

1 Answers1

0

I don't have a french version of windows so unfortunately can't tell you straight off but theres 2 ways of finding this:

  1. Search all the rules for something about printing (imprimante would be my first suggestion). Then select the group name.

    netsh advfirewall firewall show rule name=all | findstr imprimante

  2. Open the advanced firewall ui, find the equivalent string highlighted in the image below, then enter that into the command line.

enter image description here

FloatingKiwi
  • 4,408
  • 1
  • 17
  • 41
  • I did exactly the same thing as i explained in my question i searched for the group name and i re-entered it in the **group** parameter but didn't work again. – user987530 Aug 20 '16 at 08:43