Execute Script from command line
-
- Posts: 1
- Joined: 17 Jun 2021, 23:20
Execute Script from command line
Is there a way to execute a script file from on windows startup?
Re: Execute Script from command line
From the french forum :
viewtopic.php?f=25&t=1506&p=5542&hilit=.bat#p5542
Create a ".bat" file :
viewtopic.php?f=25&t=1506&p=5542&hilit=.bat#p5542
Create a ".bat" file :
Code: Select all
set CMD="C:\Program Files\Actiona\actexec.exe"
set PARMS= C:\temp\test.ascr execute,noprogress,notrayicon,noexecutionwindow,exitatend
%CMD% %PARMS%
Re: Execute Script from command line
Hello
I am trying to get this to work from Ubuntu but I keep getting the following error
I have created sh file with the following
#!/bin/bash
actiona --e-- exitatend ./home/config.ascr
But when is called it say "Unable to load the script because the file is not readable or you don't have enough rights."
Any ideas what I am doing wrong.
The goal is to autostart a script when the machine boots.... Pls can someone help!?
I am trying to get this to work from Ubuntu but I keep getting the following error
I have created sh file with the following
#!/bin/bash
actiona --e-- exitatend ./home/config.ascr
But when is called it say "Unable to load the script because the file is not readable or you don't have enough rights."
Any ideas what I am doing wrong.
The goal is to autostart a script when the machine boots.... Pls can someone help!?
Re: Execute Script from command line
There are several methods I use in Ubuntu.
First you can run the Command:
Command: actexec
Argument: MyScript.ascr
Or you can rush a bash script within Python by using Python subprocess
Command: python3
Argument: MyScript.py (which runs shell command)
======================================================
[P.S.] reading again your earlier attempt
actiona --e-- exitatend ./home/config.ascr
this is incorrect syntax.
Run in Ubuntu these commands for help ...
$ actiona --help
and
$ actexec --help
And you can run
$ which actiona
/usr/bin/actiona
and
$ which actexec
/usr/bin/actexec
to see two binaries installed in Ubuntu.
So you first attempt should have been
$ actiona -e -x filepath
or, since you do not need GUI, actexec --help
$ actexec -c filepath
filepath might be $HOME/<path to .ascr script>
So I would stick with using actexec.
==========================================================
[P.S.]
Since you wrote .. "The goal is to autostart a script when the machine boots."
you can create a cronjob which on booting runs Actiona script.
A chain.
First you can run the Command:
Command: actexec
Argument: MyScript.ascr
Or you can rush a bash script within Python by using Python subprocess
Command: python3
Argument: MyScript.py (which runs shell command)
======================================================
[P.S.] reading again your earlier attempt
actiona --e-- exitatend ./home/config.ascr
this is incorrect syntax.
Run in Ubuntu these commands for help ...
$ actiona --help
and
$ actexec --help
And you can run
$ which actiona
/usr/bin/actiona
and
$ which actexec
/usr/bin/actexec
to see two binaries installed in Ubuntu.
So you first attempt should have been
$ actiona -e -x filepath
or, since you do not need GUI, actexec --help
$ actexec -c filepath
filepath might be $HOME/<path to .ascr script>
So I would stick with using actexec.
==========================================================
[P.S.]
Since you wrote .. "The goal is to autostart a script when the machine boots."
you can create a cronjob which on booting runs Actiona script.
A chain.