gcue Posted May 9, 2008 Posted May 9, 2008 cant see why I dont get to the last step where it does the regwrite (there are machines that dont add +1 to the errorcount) is something wrong with my logic? For $x = 1 to $assets[0] $errorcount = 0 $status="1" Ping($assets[$x]) If @error Then $status="OFFLINE" $errorcount =+1 EndIf If $errorcount = 0 Then RegRead ( "\\" & $assets[$x] & "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir" ) If @error Then $status="NO_ADMIN_RIGHTS" $errorcount =+1 EndIf EndIf If $errorcount = 0 Then RegWrite("\\" & $assets[$x] & "\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "CGGROUP", "REG_SZ", "INVEST_TRADING") EndIf Next
Moderators SmOke_N Posted May 9, 2008 Moderators Posted May 9, 2008 Well, the easy way is to debug it... what is $errorcount before you get there... again, another topic you could simply solve on your own with some effort. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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