Jump to content

Recommended Posts

Posted

Am trying to execute perl script from autoit script but its not running. Th command that I have given is...

$rootDir = automation
Run("cmd.exe /" & "C:\" & $rootDir & "\updatesource.pl")

Can someone help please!

Neil

  • Developers
Posted
13 minutes ago, GAM said:

$rootDir = automation

What should this be as this doesn't make much sense?

13 minutes ago, GAM said:

Run("cmd.exe /" & "C:\" & $rootDir & "\updatesource.pl")

Should be something like:

$rootDir = "C:\automation"  ; assuming this is what you need c:\automation
Run(@ComSpec & " /c " & $rootDir & "\updatesource.pl",$rootDir )

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

Posted

I tried the above statements but did not work. The actual command in CMD looks like...

c:\automation>perl updatesource.pl

 

Neil

  • Developers
Posted

That doesn't look like a command but rather a capture of the command prompt and the command typed...... right?
So just copy that into the run statement:

$rootDir = "C:\automation"
Run(@ComSpec & " /c perl updatesource.pl",$rootDir )

Try changing /c to /k for testing in case of errors/issues so you can read them.

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

Posted

I tried with "k" to capture the output. The command prompt appears with directory displaying "C:\automation>"

It stops there. The next statement I was expecting was "perl updatesource.pl"

Neil

Posted

ok got it....I think that should run as an administrator then it will work. So far cmd is not running as an administrator

Neil

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
×
×
  • Create New...