Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change windows enviroment variable and wait.

Status
Not open for further replies.

ppgoodboy

Programmer
Oct 9, 2006
8
JP
Hi,all
I want to change the enviroment variable with perl , which call windows console as bat , just like
Code:
@start /wait C:\prcwth\processInfo.exe "THTPPCTL"
and wait like
Code:
FOR /L %%d IN (50,-1,0) DO ( ping 127.0.0.1 -n 2 > nul
,
thank you.
 
I'm sorry, what's the question, and what perl code have you so far?

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Perl code which do the same thing as windows bat.
like
@start /wait C:\prcwth\processInfo.exe "THTPPCTL"
call the .exe from the console , then wait until the process is finished.
 
Have a look to Backtick Operator to Access System Comands.

With Perl the backtick operator is one of the ways in which you can access system commands. To use this feature in Perl you just put the command that you want to execute between the backticks -- that's it. This runs the command, then you can easily access the command output.

e.g
Code:
$directoryListing = `dir c:\\`;
print $directoryListing;

try
Code:
$go= `C:\\prcwth\\processInfo.exe \"THTPPCTL\"`;


dmazzini
GSM System and Telecomm Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top