andik Posted April 20, 2009 Share Posted April 20, 2009 Hello, I allways create my scripts with the RunAsSet-Function. After Upgrade to the newest AutoIt-Version, the new RunAs-Funktion does not the same as RunAsSet! I allways get the Error: Unkonwn function name Next you can see my script "iTunes-update.au3". This is a big issue, i have to update all of my iTunes-Installations based of security issues! ----------------------------------------- if Not IsAdmin() Then RunAs ("installadm", @ComputerName, "xxxx") EndIf DirCreate($pathc) ;Installation beginnen FileCopy ($patho & $filename, $pathc & "iTunesSetup.exe", 0) run ($pathc & "iTunesSetup.exe", $pathc) ;RunAs ("install", @ComputerName, "schrummdidu",1, $pathc & "iTunesSetup.exe", $pathc) WinWaitActive ("iTunes + QuickTime", "Willkommen beim iTunes-Installationsprogramm") Send ("{Enter}") WinWaitActive ("iTunes + QuickTime", "Lizenzvertrag") Send ("{TAB}") Send ("{DOWN}") Send ("!w") WinWaitActive ("iTunes + QuickTime", "Installationsoptionen") Send ("!i") WinWaitActive ("iTunes + QuickTime", "Installation war erfolgreich!") Send ("{SPACE}") Send ("!f") RunAs() ----------------------------------------- HELP@Andreas Link to comment Share on other sites More sharing options...
99ojo Posted April 20, 2009 Share Posted April 20, 2009 Hello, I allways create my scripts with the RunAsSet-Function. After Upgrade to the newest AutoIt-Version, the new RunAs-Funktion does not the same as RunAsSet! I allways get the Error: Unkonwn function name Next you can see my script "iTunes-update.au3". This is a big issue, i have to update all of my iTunes-Installations based of security issues! ----------------------------------------- if Not IsAdmin() Then RunAs ("installadm", @ComputerName, "xxxx") EndIf DirCreate($pathc) ;Installation beginnen FileCopy ($patho & $filename, $pathc & "iTunesSetup.exe", 0) run ($pathc & "iTunesSetup.exe", $pathc) ;RunAs ("install", @ComputerName, "schrummdidu",1, $pathc & "iTunesSetup.exe", $pathc) WinWaitActive ("iTunes + QuickTime", "Willkommen beim iTunes-Installationsprogramm") Send ("{Enter}") WinWaitActive ("iTunes + QuickTime", "Lizenzvertrag") Send ("{TAB}") Send ("{DOWN}") Send ("!w") WinWaitActive ("iTunes + QuickTime", "Installationsoptionen") Send ("!i") WinWaitActive ("iTunes + QuickTime", "Installation war erfolgreich!") Send ("{SPACE}") Send ("!f") RunAs() ----------------------------------------- HELP@Andreas Hi, you can use RunAs only, to run files under another credential, not your own program. See Help: RunAs ( "username", "domain", "password", logon_flag, "filename" [, "workingdir" [, show_flag [, opt_flag ]]] ) You have to use OS Function RunAs, to run your AutoIt Exe File as admin. ;-)) Stefan Link to comment Share on other sites More sharing options...
Developers Jos Posted April 20, 2009 Developers Share Posted April 20, 2009 Hi, you can use RunAs only, to run files under another credential, not your own program. See Help: RunAs ( "username", "domain", "password", logon_flag, "filename" [, "workingdir" [, show_flag [, opt_flag ]]] ) You have to use OS Function RunAs, to run your AutoIt Exe File as admin. ;-)) Stefan HUH ????? I have made many script that lauch itself with Admin credentials so do not understand this comment. @OP: Have you checked the Helpfile for the supplied example? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
99ojo Posted April 21, 2009 Share Posted April 21, 2009 HUH ?????I have made many script that lauch itself with Admin credentials so do not understand this comment.@OP: Have you checked the Helpfile for the supplied example?Hi,see above:if Not IsAdmin() ThenRunAs ("installadm", @ComputerName, "xxxx")EndIfIn this case, i thought, you can't use RunAs to run your script with admin credentials. Or does RunAs ("Admin", "Domain","xxxx") run your script with admin credentials????? ;-))Stefan Link to comment Share on other sites More sharing options...
jerem488 Posted June 30, 2009 Share Posted June 30, 2009 I am using this function, but it don't work I launch the program manually and it works, but not with the runas() function of Autoit... WHY ?????? Qui ose gagneWho Dares Win[left]CyberExploit[/left] Link to comment Share on other sites More sharing options...
jerem488 Posted June 30, 2009 Share Posted June 30, 2009 The problem is solved ! I have changed the logon_flag option to 4 and, it works. But, I don't know why it don't works with this option to 2 (credentials only) ...... Thank you Qui ose gagneWho Dares Win[left]CyberExploit[/left] 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