Hi all,

I'm trying to write a script that will call an outside program, passing in
some set parameters and parameters that the user defines.  I'm pretty sure
it is just my lack of understanding the system() command that is holding me
back... the result of this would call the program 'aradmin' in this manner:

c:/program files/remedy/aradmin -u username -p password -x server -e
c:/path/to/defFile.def -A

my first shot had something like this:

                $cmd = $PathToAdmin . ' -u ' . $config{'Username'} . ' -p '
. $config{'Password'} 
                        . ' -x ' . $config{'Server'} . ' -e ' . $DefPath .
$defName . ' -' . $def;
                $returnCode = system($cmd);
where $PathToAdmin was the program to call, and all the rest are
parameters... that, obviously, didn't work.  Next I tried, 

                $cmd = ' -u ' . $config{'Username'} . ' -p ' .
$config{'Password'} 
                        . ' -x ' . $config{'Server'} . ' -e ' . $DefPath .
$defName . ' -' . $def;
                $returnCode = system("c:/program files/remedy/aradmin",
$cmd);

but that didn't work well either.  I've dug around a bit and saw that it
might be possible to run this through a pipe or through exec(), but I
haven't had any experience with those commands, so I wanted to ask all of
you for your opinions first.

Is there another way to construct the system() call above?  Or can someone
come up with another way to automate it?

Thank you for your insight!

Matt Reinfeldt
Remedy System Administrator & Developer
Support Solutions - U.S. Cellular
608-441-4491


_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to