voorock Posted December 20, 2005 Share Posted December 20, 2005 i want to do this dos command in autoit : find "DisplayName" c:\test.reg | sort >c:\results.txt find /v /i "Windows XP Hotfix" c:\results.txt | sort /o c:\%USERNAME%.txt May u help me ? Link to comment Share on other sites More sharing options...
MrSpacely Posted December 20, 2005 Share Posted December 20, 2005 i want to do this dos command in autoit :find "DisplayName" c:\test.reg | sort >c:\results.txtfind /v /i "Windows XP Hotfix" c:\results.txt | sort /o c:\%USERNAME%.txtMay u help me ?there are also autoit ways to sort and find buthere a little helptry looking for _rundos in the helpfile it can run commands at the prompt Link to comment Share on other sites More sharing options...
blademonkey Posted December 20, 2005 Share Posted December 20, 2005 (edited) i want to do this dos command in autoit :find "DisplayName" c:\test.reg | sort >c:\results.txtfind /v /i "Windows XP Hotfix" c:\results.txt | sort /o c:\%USERNAME%.txtMay u help me ?I think I know what you're doing but i'm not sure. I have a few questions on this.First of all, let me ask you why you're doing a find on an exported Reg file as opposed to the registry itself?Second, what key are you polling or can you display the contents of the reg file so I can acertain what you're trying to get to?Third, a little explanation of the use of sort as opposed to echo.Let me know.-Blademonkey Edited December 20, 2005 by blademonkey ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung Link to comment Share on other sites More sharing options...
MrSpacely Posted December 20, 2005 Share Posted December 20, 2005 I think I know what you're doing but i'm not sure. I have a few questions on this.First of all, let me ask you why you're doing a find on an exported Reg file as opposed to the registry itself?Second, what key are you polling or can you display the contents of the reg file so I can acertain what you're trying to get to?Third, a little explanation of the use of sort as opposed to echo.Let me know.-BlademonkeyNice avatar Indeed he has weird ways to read files much easier to use fileread and other string functionsor even just use the registry functions.But he only gave enough info to only get dos prompt support Link to comment Share on other sites More sharing options...
voorock Posted December 20, 2005 Author Share Posted December 20, 2005 (edited) I'm trying to do a program to make software inventory. first i export the regkey : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall in a .reg file then i want to find all the softwares. I make this in .bat, it works, but now i want it in autoit ... (sorry for my english) @ echo off cls echo. Inventaire de votre poste en cours .... echo %username% %COMPUTERNAME%>> c:\inventaire.txt echo ======================================================================>> c:\inventaire.txt Reg EXPORT HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall c:\uninstall.reg find "DisplayName" c:\uninstall.reg | sort >c:\results.txt find /v /i "Windows XP Hotfix" c:\results.txt | sort /o c:\%USERNAME%.txt find /v /i "Bibliorom pour XP" c:\%USERNAME%.txt | sort /o c:\%USERNAME%1.txt find /v /i "F-Secure" c:\%USERNAME%1.txt | sort /o c:\%USERNAME%2.txt find /v /i "IntelĀ® Extreme Graphics Driver" c:\%USERNAME%2.txt | sort /o c:\%USERNAME%3.txt find /v /i "Internet Explorer" c:\%USERNAME%3.txt | sort /o c:\%USERNAME%4.txt ..... find "DisplayName" c:\%USERNAME%4.txt | sort >>c:\inventaire.txt del c:\%username%*.txt del c:\results.txt del c:\uninstall.reg exit Edited December 20, 2005 by voorock Link to comment Share on other sites More sharing options...
MrSpacely Posted December 20, 2005 Share Posted December 20, 2005 I'm trying to do a program to make software inventory.first i export the regkey : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall in a .reg filethen i want to find all the softwares.I make this in .bat, it works, but now i want it in autoit ...(sorry for my english)@ echo offclsecho. Inventaire de votre poste en cours ....echo %username% %COMPUTERNAME%>> c:\inventaire.txtecho ======================================================================>> c:\inventaire.txtReg EXPORT HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall c:\uninstall.regfind "DisplayName" c:\uninstall.reg | sort >c:\results.txtfind /v /i "Windows XP Hotfix" c:\results.txt | sort /o c:\%USERNAME%.txtfind /v /i "Bibliorom pour XP" c:\%USERNAME%.txt | sort /o c:\%USERNAME%1.txtfind /v /i "F-Secure" c:\%USERNAME%1.txt | sort /o c:\%USERNAME%2.txtfind /v /i "IntelĀ® Extreme Graphics Driver" c:\%USERNAME%2.txt | sort /o c:\%USERNAME%3.txtfind /v /i "Internet Explorer" c:\%USERNAME%3.txt | sort /o c:\%USERNAME%4.txt.....find "DisplayName" c:\%USERNAME%4.txt | sort >>c:\inventaire.txtdel c:\%username%*.txtdel c:\results.txtdel c:\uninstall.regexitTry the manual for registry functions:regread regenumkey (to look for keys if you donot know name)regenumvalyou can read instandly from the registry without using needing to export and using find in dos prompt Link to comment Share on other sites More sharing options...
Danny35d Posted December 20, 2005 Share Posted December 20, 2005 voorock take a look to this post. The function that I create will give you an array with a list of all software installed on the local computer or a remote computer. The only part that you will need to take care is the find, which you can do it reading the help file and using a combination of For loop and StringInStr. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
MrSpacely Posted December 20, 2005 Share Posted December 20, 2005 voorock take a look to this post. The function that I create will give you an array with a list of all software installed on the local computer or a remote computer. The only part that you will need to take care is the find, which you can do it reading the help file and using a combination of For loop and StringInStr.or better for loops and regexp or just regexp;) stringregexphttp://www.regular-expressions.info/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now