Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Can't Get the isadmin to work

$
0
0
I can't seem to get the Isadmin to work on my script. I'm running windows 7 pro and I have an windows xp machine that I have been testing this on too, and it just hangs there and not works. Does any have any idea's on how to fix this problem?
[ autoit ]         
If DirCopy("N:\software\new_system\Teamviewer", "C:\TeamViewer", 1) Then FileCopy("C:\Teamviewer\TeamViewer_Host_Setup-ckj.exe", "C:\Documents and Settings\cbungard\Desktop", 1) Sleep(1000) EndIf If IsAdmin() Then ShellExecute("C:\Documents and Settings\cbungard\Desktop\TeamViewer_Host_Setup-ckj.exe") WinWait("Open File - Security Warning", "Name:") WinActivate("Open File - Security Warning", "Name:") ControlClick("Open File - Security Warning", "Name:", 4423) WinWait("TeamViewer 7 Host Setup", "Welcome to TeamViewer 7 Host") WinActivate("TeamViewer 7 Host Setup", "Welcome to TeamViewer 7 Host") ControlClick("TeamViewer 7 Host Setup", "Welcome to TeamViewer 7 Host", 1) WinWait("TeamViewer 7 Host Setup", "How do you want to use TeamViewer") WinActivate("TeamViewer 7 Host Setup", "How do you want to use TeamViewer") ControlClick("TeamViewer 7 Host Setup", "How do you want to use TeamViewer", 1201) ControlClick("TeamViewer 7 Host Setup", "How do you want to use TeamViewer", 1) WinWait("TeamViewer 7 Host Setup", "Press Page Down to see the rest of the agreement.") WinActivate("TeamViewer 7 Host Setup", "Press Page Down to see the rest of the agreement.") ControlClick("TeamViewer 7 Host Setup", "Press Page Down to see the rest of the agreement.", 1203) ControlClick("TeamViewer 7 Host Setup", "Press Page Down to see the rest of the agreement.", 1) WinWait("TeamViewer 7 Host Setup", "You have to supply a password.") WinActivate("TeamViewer 7 Host Setup", "You have to supply a password.") ControlSetText("TeamViewer 7 Host Setup", "You have to supply a password.", 1200, "1234") ControlSetText("TeamViewer 7 Host Setup", "You have to supply a password.", 1201, "1234") ControlClick("TeamViewer 7 Host Setup", "You have to supply a password.", 1) Sleep(9000) EndIf If ShellExecute("C:\TeamViewer\TeamViewerRegistryScript.cmd") Then Sleep(10000) EndIf If IsAdmin() Then ShellExecute("C:\TeamViewer\Teamviewer-x86.reg") WinWait("Registry Editor", "&Yes") WinActivate("Registry Editor", "&Yes") ControlClick("Registry Editor", "&Yes", 6) WinWait("Registry Editor", "OK") WinActivate("Registry Editor", "OK") ControlClick("Registry Editor", "OK", 2) Sleep(5000) EndIf ShellExecute("C:\TeamViewer\TurnOnTeamViewer.cmd")

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>