Jump to content

Searching in Registry with auto it?


Recommended Posts

Hi,

first let me say - auto it is just great

but there is a little Problem....

Well,

I´d like to search a string in registry, but let me explain in an example:

For searching IE-Version in Registry i used an batch-File like this:

REM First call IE-Version - see below 
call :IE-Version

REM ___ compare IE-Version - if IE = IE 6SP1 goto exit, otherwise goto Inst IE6SP1
if "%IEVersion%"=="62800.1106" goto ie6inst
exit

REM _______ Get IE-Version ____________________________
:IEVersion
rem Write Reg-Key in temp-File
regedit /e "%temp%\ie.tmp" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer"

REM Get Version from Temp-File
for /f "tokens=2 delims==" %%a in ('%systemroot%\system32\find /n "Build" "%temp%\ie.tmp"') do set IEVersion=%%a
for /f "tokens=1 delims=" %%a in (%IEVersion%) do set IEVersion=%%a
goto :eof

:ieinst
path\to\ie6sps1.exe /q:r /a:n
exit

In the example I use ie.dump (contains hole key) and search the file for the Version - get it and then compare it....

So my question:

Is this possible in auto-it?

(Yes, i can use a batch-file, but it would be very huge - and it´s only a windows batch file - so I don´t want to use it.....)

Maybe with comspec?

But how work with output from @comspec? Can Auto-It use it for the next script actions?

May I have write the search results from @comspec into another file...

and can I use an auto it-$var in the @comspec instruction?

questions over questions...

But if anyone has an idea - please send me...

Edited by connor
Link to comment
Share on other sites

$ver = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer", "Build")

If $ver = "62800.1106" Then
    MsgBox(4096,"Info", "You need to install SP1 for IE 6!")
Else
    MsgBox(4096,"Info", "Your IE version is " & $ver)
EndIf

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...