BATCH REG QUERY CSV

Résolu/Fermé
Lol42 Messages postés 10 Date d'inscription mercredi 2 mai 2012 Statut Membre Dernière intervention 4 mai 2012 - Modifié par Lol42 le 3/05/2012 à 15:53
 Utilisateur anonyme - 3 mai 2012 à 18:10
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
A voir également:

5 réponses

Utilisateur anonyme
3 mai 2012 à 15:58
Salut,

Bah...

Tu tapes ta commande dans un fichier .bat :)..
0
Lol42 Messages postés 10 Date d'inscription mercredi 2 mai 2012 Statut Membre Dernière intervention 4 mai 2012
3 mai 2012 à 16:02
Non justement ça ne fonctionne pas :(
0
Utilisateur anonyme
3 mai 2012 à 16:17
Clic droit, exécuter en tant qu'admin ?
0
Lol42 Messages postés 10 Date d'inscription mercredi 2 mai 2012 Statut Membre Dernière intervention 4 mai 2012
3 mai 2012 à 16:19
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
Utilisateur anonyme
3 mai 2012 à 16:42
Hum..

Batch ça pour voir :

Req Query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall > test.txt
0
Lol42 Messages postés 10 Date d'inscription mercredi 2 mai 2012 Statut Membre Dernière intervention 4 mai 2012
3 mai 2012 à 16:45
idem..
(merci de ton aide au fait :) )
0
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
Lol42 Messages postés 10 Date d'inscription mercredi 2 mai 2012 Statut Membre Dernière intervention 4 mai 2012
3 mai 2012 à 17:41
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

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Utilisateur anonyme
3 mai 2012 à 18:10
Oui, ça peu aider !!

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