Jump to content

Recommended Posts

Posted (edited)

Hi

 

Any ideias how i can call external program like psexec tools to ask the computername that i wont to connect like this

 

run("psexec.exe2" & \\computername -u myuser cmd.exe

this sould be called my

myapp.exe computer1

Edited by Alexandre
  • Developers
Posted

Moved to the appropriate forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

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.
  :)

Posted
6 minutes ago, Jos said:

Looks like a wrong program name and a space missing after it!

Run("psexec.exe" & \\ $CmdLine[0] & ' -f -u "europe\sup-analmeida" cmd.exe')

 

When i compile i have this error

 

image.png.eec59b0f319bef15ac6c30bc30795579.png

 

  • Developers
Posted (edited)

You really need to run au3check on your script to see whether you made syntax mistakes like you have done with this line.
So I would suggest you install the full SciTE4AutoIt3 installer and simply do a run first to check your script .
That gives this error:

>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:D:\Development\AutoIt3\programs\test\test\test.au3
"D:\Development\AutoIt3\programs\test\test\test.au3"(3,20) : error: syntax error (illegal character)
Run("psexec.exe" & \
~~~~~~~~~~~~~~~~~~~^

Which is a clear indication you have those backslashes there without them being part of a literal string.

Jos  

Edited by 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.
  :)

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
  • Recently Browsing   0 members

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