Your solution maybe good, but I have another problem. Maybe someone had this new problem to and can help me.
I've put in my script the line:
  $obSh = Win32::OLE->new('WScript.Shell', sub {$_[0]->Quit;})
or die "Can't start Shell", Win32::OLE::LastError();
This line gives me an error:
  Can't start ShellWin32::OLE(0.17) error 0x80040154: "Class not registered"
Thanks!