Thanks Timothy for help !
However problem is in listing open windows in teractive user's login from
scheduler which is running with different user's login !!
My code is like this
use Win32::Setupsup qw(EnumWindows GetWindowText);
open (TITWIN,">c:\\system\\vsj\.log");
$status = EnumWindows(\@windows);
foreach $window (@windows) {
GetWindowText($window,\$WINTEXT);
print TITWIN "$window>\t , $WINTEXT \n\n";
}
close TITWIN;
Now let's say user AAA is loggged in interactively and has opened
application.
Scheduler is running with USER BBB and above script is running with his
login !
Now if script is run thr scheduler (user BBB login), it does not list any
open
window in user AAA's desktop !!! And since it does not list any window, I
can not close
it !
If I run the script thr user AAA's login (with user AAA logged on
interactively) ,
the logfile contains all open windows open in user AAA's login ! But this is
not
the situation !
Hope you got the problem !!
With Best Regards,
Vidyadhar
-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 13:57
To: Jangale V-S; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: killing a process by window title; was: socket application
Check out a module called Win32::SetupSup. It will let you enumerate
windows, send keys to a window, etc.
-----Original Message-----
From: Jangale V-S [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 9:36 PM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: killing a process by window title; was: socket application
Further to this topic I have a slightly different requirement.
I want to kill process running on interactive desktop (with interactive
user's login) through scheduler .
The background is
User logged on interactively on a machine are running one application
which they sometimes leave ON overnight .
A process is running thr schduler (using different user account which is
administrator account) which has to update certain files related to above
application. For this the applcation has to be terminated/closed after
verifying
window title !
Now how can I get/enumerate windows which are open in interactive user's
desktop ?
With Best Regards,
Vidyadhar
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs