Unsolved
This post is more than 5 years old
10 Posts
0
691
December 11th, 2006 07:00
EMC autostart in a workgroup. How to excute script that require login.
Hi
We're running Autostart V5.2.1 in a workgroup. It seems like the installation is OK.
Then we want to execute a script with Utility processes. But in the settings we need to specify login info including domain (which we don't have,we're in a workgroup).
I've tried using the PCname, workgroupname, blank, dot, node alias, virtual domain name, usergroupname without success.
The log file created just contain on line describing that the file is created.
Any ideas?
Best regards
Arild Fossbakk
We're running Autostart V5.2.1 in a workgroup. It seems like the installation is OK.
Then we want to execute a script with Utility processes. But in the settings we need to specify login info including domain (which we don't have,we're in a workgroup).
I've tried using the PCname, workgroupname, blank, dot, node alias, virtual domain name, usergroupname without success.
The log file created just contain on line describing that the file is created.
Any ideas?
Best regards
Arild Fossbakk
No Events found!


tribicic
157 Posts
0
December 11th, 2006 07:00
In Perl, you can execute external commands by enclosing it in between backtick characters, for example:
@result=`echo "blah..."`;
This will execute the command and store the output in the @result array.
Or you can use the system() function:
$result = system("echo \"blah...\"");
This one executes whatever you give it as a parameter and returns the errorcode 0 if successfull or not if the operation fails.
ArildFossbakk
10 Posts
0
December 11th, 2006 07:00
So to avoid spending to much time learing perl... How do I execute a js (JScript) file from perl?
regards
Arild
tribicic
157 Posts
0
December 11th, 2006 07:00
tribicic
157 Posts
0
December 11th, 2006 08:00
$err=system("c:\\test.js");
if ($err) {
exit (1);
} else {
exit (0);
}
This will do the basic error checking, causing the script to fail if for whatever reason test.js fails. If you don't care about error handling, then you can just use the firt line. Also note that two backslash characters (\\) are not a typo.
ArildFossbakk
10 Posts
0
December 11th, 2006 08:00
In command prompt I can just type test.js and it runs.
Previously when I installed Autostart in a domain I used Utility processes and just added a script like this (this worked)
@echo off
c:\test.js
But now in a workgroup I have to run this js file from Perl.
So in Perl it should be like this? (which a cannot get working)
@result=`echo "c:\test.js"`;
or
$result = system("echo \"c:\test.js\"");
Actually I don't need a returning value, I just want to execute the file.
ArildFossbakk
10 Posts
0
December 12th, 2006 03:00
Thanks