Bettylou Posted December 2, 2015 Author Share Posted December 2, 2015 (edited) Thank you jfish.I need help with Internet Explorer please. I think I need to put it into an array but I can't figure out how.Local $IE = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer", "svcVersion")This is what I am trying to get running. I'm using msgbox and win 7 just while I'm trying to get it to run correctly. I'll change to writefile and include all the operating systems when I get it to work.#Include <MsgBoxConstants.au3> Local $IE = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer", "svcVersion") If @OSVersion = "WIN_7" & $IE <> "11" Then MsgBox($MB_OK,"", "IEOOD") Else MsgBox($MB_OK,"", "IE11") EndIfI got it to run. I only have access to a win 7 computer so I don't know if it works on other systems.expandcollapse popup#Include <File.au3> ; create text file $file = FileOpen("Scan.txt", 2) FileWrite($file, "Result of Scan" & @CRLF) FileWrite($file, "Running from:" & @DesktopDir & @CRLF) FileWrite($file, "-------------------" & @CRLF) ; OS Versions,Arch,ServicePack If @OSVersion = "WIN_XP" Then _OSXP() ElseIf @OSVersion = "WIN_Vista" Then _OSVista() ElseIf @OSVersion = "WIN_7" Then _OS7() ElseIf @OSVersion = "WIN_8" Then FileWriteLine( $File, "Windows 8" & " " & @OSArch & " " & @CRLF) ElseIf @OSVersion = "WIN_81" Then FileWriteLine( $File, "Windows 8.1 " & @OSArch & @CRLF) ElseIf @OSVersion = "WIN_10" Then FileWriteLine( $File, "Windows 10 " & @OSArch & @CRLF) EndIf ; UAC on or off Local $UAC = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA") If $UAC <> 0 Then $UAC = "Enabled!" Else $UAC = "Disabled!" EndIf FileWriteLine($File, "UAC is " & $UAC & @CRLF) ;Internet Explorer Local $IE = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer", "svcVersion") If @OSVersion = "WIN_XP" Then _IEXP() ElseIf @OSVersion = "WIN_7" Or @OSVersion = "WIN_8" Or @OSVersion = "WIN_81" Or @OSVersion = "WIN_10" Then _IE7810() EndIf Func _OSXP() If @OSServicePack <> "Service pack 3" Then FileWriteLine( $File, "Windows XP " & @OSArch & "!Service Pack is out of date!") Else FileWriteLine( $File, "Windows XP " & @OSArch & " " & @OSServicePack & @CRLF) EndIf EndFunc Func _OSVista() If @OSServicePack <> "Service pack 2" Then FileWriteLine( $File, "Windows Vista " & @OSArch & "!Service Pack is out of date!") Else fileWriteLine( $File, "Windows Vista " & @OSArch & " " & @OSServicePack & @CRLF) EndIf EndFunc Func _OS7() If @OSServicePack <> "Service pack 1" Then FileWriteLine( $File, "Windows 7 " & @OSArch & " " & "!Service Pack is out of date!") Else FileWriteLine( $File, "Windows 7 " & @OSArch & " " & " " & @OSServicePack & @CRLF) EndIf EndFunc Func _IEXP() If $IE <> 8 Then FileWriteLine( $File, "Internet Explorer is out of date!") Else FileWriteLine($File, "Internet Explorer 8") EndIf EndFunc Func _IE7810() If $IE <> 11 Then FileWriteLine( $File, "Internet Explorer is out of date!") Else FileWriteLine($File, "Internet Explorer 11") EndIf EndFunc FileClose($file) Edited December 5, 2015 by Bettylou Link to comment Share on other sites More sharing options...
Bettylou Posted December 7, 2015 Author Share Posted December 7, 2015 (edited) I need help with IE please. Windows 10 is printing outInternet Explorer 11.11.10586.0 *Internet Explorer is out of date*How do I get it to output 11 only please? expandcollapse popup#Include <File.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <Constants.au3> Global Const $version = "0001" ; create text file Local $hLogFile = FileOpen("Log.txt", 2 + 8 + 128) ;$FO_OVERWRITE = 2 / $FO_CREATEPATH = 8 / $FO_UTF8 = 128 FileWriteLine($hLogFile, "Result of Scan by Bettylou version 0001" & @CRLF) FileWriteLine($hLogFile, "Running from:" & @DesktopDir & @CRLF) FileWriteLine($hLogFile, "***------------------------------------------------***" & @CRLF) ; OS Versions,Arch,ServicePack If @OSVersion = "WIN_XP" Then _OSXP() ElseIf @OSVersion = "WIN_VISTA" Then _OSVista() ElseIf @OSVersion = "WIN_7" Then _OS7() ElseIf @OSVersion = "WIN_8" Then FileWriteLine($hLogFile, "Windows 8 " & @OSArch & @CRLF) ElseIf @OSVersion = "WIN_81" Then FileWriteLine($hLogFile, "Windows 8.1 " & @OSArch & @CRLF) ElseIf @OSVersion = "WIN_10" Then FileWriteLine($hLogFile, "Windows 10 " & @OSArch & @CRLF) EndIf ; UAC on or off Local $UAC = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA") If $UAC <> 0 Then $UAC = "Enabled!" Else $UAC = "*Disabled*" EndIf FileWriteLine($hLogFile, "UAC is " & $UAC & @CRLF) ;Internet Explorer Local $IE = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer", "svcVersion") If @OSVersion = "WIN_XP" Then _IEXP() ElseIf @OSVersion = "WIN_7" Or @OSVersion = "WIN_8" Or @OSVersion = "WIN_81" Or @OSVersion = "WIN_10" Then _IE7810() EndIf FileWrite($hLogFile, @CRLF & "***=================Firewall - Anti-Virus=================***" & @CRLF & @CRLF) Func _OSXP() If @OSServicePack <> "Service pack 3" Then FileWriteLine($hLogFile, "Windows XP " & @OSArch & " " & @OSServicePack & " " & "*Service Pack is out of date*") Else FileWriteLine($hLogFile, "Windows XP " & @OSArch & " " & @OSServicePack & @CRLF) EndIf EndFunc Func _OSVista() If @OSServicePack <> "Service pack 2" Then FileWriteLine($hLogFile, "Windows Vista " & @OSArch & " " & @OSServicePack & " " & "*Service Pack is out of date*") Else fileWriteLine($hLogFile, "Windows Vista " & @OSArch & " " & @OSServicePack & @CRLF) EndIf EndFunc Func _OS7() If @OSServicePack <> "Service pack 1" Then FileWriteLine($hLogFile, "Windows 7 " & @OSArch & " " & @OSServicePack & " " & "*Service Pack is out of date*") Else FileWriteLine($hLogFile, "Windows 7 " & @OSArch & " " & " " & @OSServicePack & @CRLF) EndIf EndFunc Func _IEXP() If $IE <> 8 Then FileWriteLine($hLogFile, "Internet Explorer " & $IE & " Internet Explorer is out of date!") Else FileWriteLine($hLogFile, "Internet Explorer 8") EndIf EndFunc Func _IE7810() If $IE <> 11 Then FileWriteLine($hLogFile, "Internet Explorer " & $IE & " *Internet Explorer is out of date*") Else FileWriteLine($hLogFile, "Internet Explorer 11") EndIf EndFunc FileClose($hLogFile) Edited December 7, 2015 by Bettylou Link to comment Share on other sites More sharing options...
Bettylou Posted December 11, 2015 Author Share Posted December 11, 2015 I've fixed all the problems listed above. Now I need help with Window Firewall please.Local $FW = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile", "EnableFirewall") If $FW <> 0 Then $FW = "Enabled!" Else $FW = "*Disabled*" EndIf FileWrite($hLogFile, "Windows Firewall is " & $FW & @CRLF)That part works fine but I want to add;If Windows Firewall is disabled then call a function that will search for other firewalls Link to comment Share on other sites More sharing options...
Bettylou Posted March 22, 2016 Author Share Posted March 22, 2016 I want to get the value ("ProductName"="Java 8 Update 73") on a remote computer. Won't the CLSID be different on each computer? Local $JavaVersion = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\4EA42A62D9304AC4784BF2381208370F") Link to comment Share on other sites More sharing options...
odaylton Posted November 2, 2016 Share Posted November 2, 2016 On 17/11/2015 at 9:29 PM, JLogan3o13 said: @Trong we try to follow the "Teach a man to fish" motto on this forum, especially for new users; usually more helpful to point someone to the solution, allowing them to learn along the way, rather than blasting someone with 700 lines of convoluted code on their third day.. I even understand that we must teach to fish rather than giving fish but in this case I believe that many like me will not waste hours searching item by item listing above exelente work Trong Link to comment Share on other sites More sharing options...
odaylton Posted November 2, 2016 Share Posted November 2, 2016 (edited) hello Bettylou I see that your idea is a very useful program to monitor several machines. And I'm also feeling that you have not mastered the autoit like me. But one thing that helped me to understand the beauty of autoit is an old program called Autoit debuger. You know he is currently abandoned but seeing the forum follows the link AutoIt_Debugger_Setup_v0.47.0.zip in this post #413 thank I hope it helps PS anyone know of any better debug Edited November 2, 2016 by odaylton 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