Reply To: adding Windows support for resume-from-standby

#11900
jae_63
Participant

Thanks again for your response, Ron.

Since it’s a Dell which is a few years old, my BIOS options are pretty limited. I guess that’s a disadvantage of buying from a PC vendor rather than a motherboard vendor. My ethernet driver is up-to-date.

I was able to start&stop Firefly without any problems, but for some reason was unable to start&stop Bonjour (although this worked fine on my laptop). Fortunately the following solution works, using COM (rather than net start/net stop): kill iTunes if it’s running, then start a fresh iTunes. The fresh iTunes apparently tickles Bonjour in the necessary fashion.

So I’m back in business now just using iTunes. I might pursue Firefly again at a later date.

My script (intended to be run as a CGI script from a web server) is below for posterity; thanks again for your help!


#!c:/Perl/bin/perl
use strict;
use Win32::Process::List;
use Win32::OLE;

my $P = Win32::Process::List->new(); # constructor
my %list = $P->GetProcesses();
my $isRunning = 0;
foreach my $key ( keys %list) {
if ($list{$key} =~ /iTunes.exe/) {
$isRunning = 1;
last;
}
}

if ($isRunning) {
my $iTunes = Win32::OLE->new("iTunes.Application");
$iTunes->Quit();
}
sleep 1;
my $iTunes = Win32::OLE->new("iTunes.Application");
$iTunes->VisualsEnabled(1);

print "Content-type: text/htmlnn";
print "re" if ($isRunning);
print "started iTunesn";