urian Posted January 20, 2009 Share Posted January 20, 2009 Hello, ther first sorry for my english. I try conver a batch script to autoit but i dont undernstand... I attached the batch. My first problem is with regread because i need read a key, if the .framework2.0 is installed pass but if not installed call a .exe that is .net2.0 Later i need do the same witch adobe and the last i need to see the operating system (in value reg) if i find vista on a specific value in the reg execute a .exe if not i execute other .exe My script i think starts $var = RegRead ("HKLM\SOFTWARE\Microsoft\.NETFRAMEWORK\v2.0.50727") if the $var is error (not installed .net) goto exe, if the $var is ok (goto the next step) Can you help me please. Thank you very much in advance. If you need my email is urian84@gmail.comautorun.txt Link to comment Share on other sites More sharing options...
Bert Posted January 20, 2009 Share Posted January 20, 2009 (edited) let me build it for you..give me a few minutes Edited January 20, 2009 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted January 20, 2009 Share Posted January 20, 2009 I ran out of time for I have to do something, but this is what I have so far. $RegistryPathForDotNetDetection = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" $RegistryPathForAdobeDetection = "HKEY_LOCAL_MACHINE\SOFTWARE\ADOBE\ACROBAT READER" $regread1 = RegRead($RegistryPathForDotNetDetection, "Install") $regread2 = RegRead($RegistryPathForAdobeDetection, "") if $regread1 = 1 or $regread = 2 then runwait(@ScriptDir&'\Prerequisitos\framework2.0\dotnetfx.exe /c:"install /l') EndIf if $regread2 = -1 then runwait('msiexec /i '&@ScriptDir&'"\Prerequisitos\Reader\AcroRead.msi" ALLUSERS=TRUE TRANSFORMS="\Prerequisitos\Reader\AcroRead.mst" /QB') ;hope that works. NOT TESTED EndIf The following is what I didn't get through, but someone else may be able to help you the rest of the way. :ver_install FOR /F "skip=2" %%G IN ('REG QUERY "HKLM\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION" /v "Productname"') DO SET _sistema=%%G echo %_sistema% |find "Vista" IF %ERRORLEVEL%== 0 (goto ver_vista) ELSE (goto ver_xp) :ver_vista start setup.exe echo Windows Vista goto exit :ver_xp regsvr32 /s ".\Busqueda general\Alchemy\auapix.dll" START (.\revista.exe) echo Windows XP :exit The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
urian Posted January 20, 2009 Author Share Posted January 20, 2009 god! youre a best fck developer hehe This is a installation cd for my job (i need for tomorrow or next) and i imagine that the next part of script is similar to yours. I try this moment but im very bad, i go to begin to study autoit though the documentation is explained little. Thanks :-D 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