Jump to content

autoit script with ControlClick dont run with psexec on remote pc


Recommended Posts

hey 

i created a autoit script and compiled him to exe and when i run hum on the remote computer with psexec 

i can see the prosses sart on the remote computer but it stay on and didnt do anything

 

when i run the script manually on the remote cimputer its work great 

 

this is the script

 

 

#RequireAdmin
#include <AutoItConstants.au3>

ShellExecute("C:\burnaware_free_10.2.exe")

While ProcessExists("burnaware_free_10.2.exe")
;SplashTextOn("Title", "Message goes here.", 650, 500, -1, -1,  $DLG_MOVEABLE , "", 24)


WinWait("Select Setup Language" , "Select the language to use during the installation:" )
ControlClick("Select Setup Language" , "Select the language to use during the installation:" , "[CLASS:TNewButton; INSTANCE:1]" )

WinWait("Setup - BurnAware Free" , "Welcome to the BurnAware Free Setup Wizard" )
ControlClick("Setup - BurnAware Free" , "Welcome to the BurnAware Free Setup Wizard" , "[CLASS:TNewButton; INSTANCE:1]" )

WinWait("Setup - BurnAware Free" , "License Agreement" )
ControlClick("Setup - BurnAware Free" , "License Agreement" , "[CLASS:TNewRadioButton; INSTANCE:1]" )
ControlClick("Setup - BurnAware Free" , "License Agreement" , "[CLASS:TNewButton; INSTANCE:2]" )

WinWait("Setup - BurnAware Free" , "Select Destination Location" )
ControlClick("Setup - BurnAware Free" , "Select Destination Location" , "[CLASS:TNewButton; INSTANCE:3]" )

WinWait("Setup - BurnAware Free" , "Select Start Menu Folder" )
ControlClick("Setup - BurnAware Free" , "Select Start Menu Folder" , "[CLASS:TNewButton; INSTANCE:4]" )


WinWait("Setup - BurnAware Free" , "Select Additional Tasks" )
ControlClick("Setup - BurnAware Free" , "Select Additional Tasks" , "[CLASS:TNewButton; INSTANCE:4]" )

WinWait("Setup - BurnAware Free" , "Ready to Install" )
ControlClick("Setup - BurnAware Free" , "Ready to Install" , "[CLASS:TNewButton; INSTANCE:4]" )

WinWait("Setup - BurnAware Free" , "Completing the BurnAware Free Setup Wizard" )
ControlClick("Setup - BurnAware Free" , "Completing the BurnAware Free Setup Wizard" , "[CLASS:TNewButton; INSTANCE:4]" )

ProcessClose ( "BurnAware.exe" )


   WEnd

 

 

 

 

Link to comment
Share on other sites

The commandline options are definitely the way to go. For the record though, it sounds like the issue is likely that your process isn't running interactively. You would need to tell psexec to start burnaware (or whatever application) interactively (using -i), and then start your script/compiled exe interactively.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...