RE: reboot a remote win32 machine
Which module are you using to do this? Here's an example with Win32API::Registry ... use Win32API::Registry 0.13 qw( :ALL ); $victim="REMOTECOMPUTERNAME"; $seconds=3; $force=0; $rebootaftershutdown=1; InitiateSystemShutdown($victim,"This machine is going down!", $seconds, $force,$rebootaftershutdown); HTH... -Original Message-From: Tfbsr Bertrand [mailto:[EMAIL PROTECTED]Sent: Sunday, November 16, 2003 1:17 PMTo: perl perlSubject: reboot a remote win32 machine I am trying to reboot a remote win32 machine, what do I need to do to ensure that it works. It always reboots the machine I am running the code on. Thanks Terry Do you Yahoo!?Protect your identity with Yahoo! Mail AddressGuard
Double Byte Characters.
Greeting Perlers, I have a mixed problem with Perl and HTML. I'm developing a web form to send contact emails, that uses two byte characters (kanji, chinese characters, etc). If I use the perl script with input from the console, it send the email correctly, but when I use the script in the web environment, the browser translates the kanji to HTML Codes. So the main question would be... can you translate the HTML Codes to double byte characters in Perl prior to encode the message to send? this problem is mainly with the subject, as the content can be html encoded... thanks in advanced... - Juan Carlos Cruz Dada Senior Developer Cital Web Solutions [EMAIL PROTECTED] Tel. 247-7900 Ext. 213 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Using SendMail on IIS Server
1. Install the IIS SMTP server. 2. Configure to allow relay from the local host only. 3. Use a simple perl program to drop a file into the pickup directory that contains a properly formatted mail messeage. Give it a .eml extension. IIS SMTP monitors the pickup directory and will send out the message as soon as you close the file. $message = RFC833/Mime formatted Message stuffed into this string ; $filename = 123456.eml ; # really should create a random file name $open (MAILFILE, C:/Inetpub/mailroot/Pickup/$filename ; print MAILFILE $filename ; close MAILFILE ; -Original Message- From: James Brown [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 10:52 AM To: Richard Morse; [EMAIL PROTECTED] Subject: Re: Using SendMail on IIS Server Below is an extract from some code I wrote to mail network traffic graphs around. You should find Mime::Lite really easy to use and reliable and it can send plaintext or html or attachment. Also, the email addresses can either be in the normal format, or those used by an exchange server (I think). Hope this helps, James. use strict; use MIME::Lite; my $smtp = 'mailhost.zen.co.uk'; #SMTP Server my $from = '[EMAIL PROTECTED]' #From Address #Prepare plain text email $msg = MIME::Lite-new( From = $from, To = 'to address', Subject = 'my_subject', Cc ='ccaddress', Type = 'TEXT', Data = This is the message body\n\nRegards\n\nJames. ); #Send Email MIME::Lite-send( 'smtp', $smtp, Timeout=120 ); $msg-send() || die Can't send mail to $mails[$i]{'to'}; Richard Morse wrote: On Thursday, November 13, 2003, at 06:54 AM, $Bill Luebkert wrote: [EMAIL PROTECTED] wrote: Just a slight problem - the standard sendmail program on a Unix box does not work on an IIS Server - does someone have a sample bit of Perl to send an email from a perl program running on an IIS Server?? Don't know anything about IIS, but you can send simple email with Net::SMTP and more complicated email with MIME::Lite. There are versions of sendmail for Windoze, but the above two modules will work on both systems, so that would be my pick. I also suggest Jenda Krynicky's (sp?) Mail::Sender... Ricky ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Win32 unblessed reference error
Title: Message Hi, I can't seem to figure out why it is giving me this error Can't call method "Cells" on unblessed reference at c:\inetpub\wwwroot\trialmap\cgi-bin\hmtEvalUP.pl line 1334. $Worksheet1-Cells is not causing any problems. Any help would be appreciated. Thanks, David my $Class = "Excel.Application";$Excel = Win32::OLE-GetActiveObject($Class);if ( ! $Excel ){$Excel = new Win32::OLE( $Class )|| die "Could not create an OLE '$Class' object";}$Excel-{DisplayAlerts}=0;my $Workbook = $Excel-Workbooks-Add();my $Worksheet1 = $Workbook-Worksheets(1);$Worksheet1-{Name} = "info.";# get the column headers from each table in the db.my ($colInfo, $colData, $colResults) = getColNames();$row = 1;$col = 1;# add column headers for sheet 1my @colI = @{$colInfo};my $num = @colI;for ($i=0; $i$num - 1; $i++){$Worksheet1-Cells($row,$col)-{Value} = $colI[$i]; $col++; } my $numCols = $col; # Add some formatting for ($i=1; $i$numCols; $i++) { $Worksheet1-Cells($row,$i)-Font-{Bold} = "True";$Worksheet1-Cells($row,$i)-Font-{Size} = 12;}# add column headers for sheet 2my $Worksheet2 = $Workbook-Worksheets(2);$Worksheet2-{Name} = "Data Results";$col = 1;foreach $c (@{$colData}){$Worksheet2-Cells($row,$col)-{Value} = $c;# 1334 ##$col++;}