MikhsilSV Posted December 8, 2015 Share Posted December 8, 2015 (edited) script.au3:RunWait("\\Server\share\SomeApp.exe") WinWaitActive("Test click inactive desktop", "Button&2") Send("!2") On admin machine executing:psexec \\RemotePC -s \\server\share\script.exeButtons remains unclickededit: by running usual way fails too Edited December 8, 2015 by MikhsilSV Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 8, 2015 Moderators Share Posted December 8, 2015 @MikhsilSV What if you run PSEXEC with the -i (interactive) switch in addition to -s? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Kovacic Posted December 8, 2015 Share Posted December 8, 2015 (edited) This is my normal command line layout for psexec.. psexec \\Computername -accepteula -i -c -f MyApp.exe(in addition to what JLogan3o13 said )Works every time -accepteula This flag supresses the display of the license dialog. -c Copy the specified program to the remote system for execution. If you omit this option the application must be in the system path on the remote system. -i Run the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session. -f Copy the specified program even if the file already exists on the remote system. Edited December 8, 2015 by Kovacic C0d3 is P0etry( ͡° ͜ʖ ͡°) Link to comment Share on other sites More sharing options...
Developers Jos Posted December 8, 2015 Developers Share Posted December 8, 2015 Doubt the SEND() command will work when running with different credentials on the target machine. Might want to try ControlSend() or ControlClick()Jos 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...
Kovacic Posted December 9, 2015 Share Posted December 9, 2015 If you want to run it as someone else, you can always hard code the creds.. I use this to elevate permissions for certain apps. Just know if the PW expires, you will have to recompile.. If NOT isadmin() Then RunAs("Administrator","MyDomain", "MyAdminPassword", 0, @ScriptFullPath & " on", "", @SW_SHOWMINIMIZED) Exit EndIf This will cause the script to relaunch under new creds, that may help. C0d3 is P0etry( ͡° ͜ʖ ͡°) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 9, 2015 Moderators Share Posted December 9, 2015 Jos is of course correct, I missed that you were doing a Send rather then ControlSend. If you are unable to interact with the window controls, you are going to find it nigh impossible to run remotely. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
MikhsilSV Posted December 15, 2015 Author Share Posted December 15, 2015 Sorry for long time. I encount several issues while enforcing to work unattend installation of foobar2000 v1.3.9I try to solve it by suggestions from this topic and my ideas, a lot of things. With no success.My last version of script (unwork, even by doubleclecking it):Local $vCaption = "foobar2000 v1.3.9 Setup" Local $SRC = "\\Server\someshare\foobar2000_v1.3.9.exe" RunWait($SRC) sleep(300) ;just for any case Local $hWnd=WinWaitActive($vCaption, "&Next >", 500) ;Send("!n") ;i tryes this first Local $R=ControlClick($hWnd,"","[CLASSNN:Button2]") if $R==0 then Exit(-5) endif WinWaitActive($vCaption, "I &Agree") Send("!a") WinWaitActive($vCaption, "&Next >") Send("!n") WinWaitActive($vCaption, "&Next >") Send("!n") WinWaitActive($vCaption, "&Install") Send("!i") WinWaitActive($vCaption, "&Run foobar2000") Send("!r") WinWaitActive($vCaption, "&Finish") Send("!f")I work on Win7 x64 Sp1+Ups if it something meansCan anyone write working scritp??? This one app is not life-critical, but i want how to fight with similar issuesAlso tries clicking on TButton-s in super-simple GUI APP created & compiled in Lazarus, it s completely unclickable! Link to comment Share on other sites More sharing options...
orbs Posted December 15, 2015 Share Posted December 15, 2015 MikhsilSV,foobar2000 has /s switch for silent install. have you tried it?(requires elevation of course, but PsExec handles that for you, with the -h switch)B.T.W. welcome to AutoIt and to the forum! Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
MikhsilSV Posted December 15, 2015 Author Share Posted December 15, 2015 (edited) MikhsilSV,foobar2000 has /s switch for silent install. have you tried it?This is cause why i throw a glance on AutoIt side. Some apps has broken silent install ability, some has unneded payload enabled by default. Edited December 15, 2015 by MikhsilSV Link to comment Share on other sites More sharing options...
orbs Posted December 15, 2015 Share Posted December 15, 2015 (edited) i just downloaded and installed silently (Win10 elevated command prompt with /S switch) the latest stable release (v1.3.9).i see no junk payload.i did notice this: the switch is case-sensitive, i.e. should be /S not /s.EDIT: also works over PsExec. Edited December 15, 2015 by orbs additional information Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
MikhsilSV Posted December 15, 2015 Author Share Posted December 15, 2015 (edited) i did notice this: the switch is case-sensitive, i.e. should be /S not /s.EDIT: also works over PsExec. Just tried and ... Success! Previously i used exect /s switch. Thanks for hint! Edited December 15, 2015 by MikhsilSV 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