BATCH REG QUERY CSV

Résolu
Bonjour,

Lorsque j'exécute la commande suivante:

req query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall > test.csv

Cela fonctionne à merveille.

Ma question est:
Comment exécuter ceci par un batch?

Merci

5 réponses

  1. Salut,

    Bah...

    Tu tapes ta commande dans un fichier .bat :)..
    0
    1. Non justement ça ne fonctionne pas :(
      0
  2. Clic droit, exécuter en tant qu'admin ?
    0
    1. Non plus..
      Par contre maintenant quand je le lance il m'affiche "Le processus ne peut pas accéder au fichier car celui ci est utilisé par un autre processus"...
      0
  3. Hum..

    Batch ça pour voir :

    Req Query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall > test.txt
    0
    1. idem..
      (merci de ton aide au fait :) )
      0
  4. C'est nul le batch x).

    Tu ne veux pas que je te file le code en Autoit :) ?

    Teste :

    if exist C:\test.txt (del C:\test)
    Req Query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall > C:\test.txt


    Désolé je ne suis pas très fort en batch,je préfère le shell.
    ?? Saachaa ?
    Contributeur CCM
    0
    1. C'est bon finalement ça fonctionne (sans trop que je sache pourquoi ça clochait..

      if defined %ProgramFiles(x86)% (
         goto 64bits
      ) else (
         goto 32bits
      )
      
      :32bits
      reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall > test.csv
      
      :64bits
      reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall > test.csv
      


      Au cas où quelqu'un ait besoin..!!

      Merci encore Saachaa :)
      0
  5. Oui, ça peu aider !!

    Bah... J'ai rien fait mais... de rien :).
    0