Title: Message

Or

$DestPath = "c:\\winnt\\temp\\”;

 

 

 

-----Original Message-----
From: Bingham, Robert [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 4:10 PM
To: 'Guess_Who344'; [EMAIL PROTECTED]
Subject: RE: Access is denied??

 

try:

my $DestPath = "c:\\winnt\\temp\\adlogon.txt";

-----Original Message-----
From: Guess_Who344 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 3:44 PM
To: [EMAIL PROTECTED]
Subject: Access is denied??

I'm an administrator on the computer and I get 'Access is denied' when this code is executed. 

 

Can anyone tell me why?

 

use Win32;

 

my $SourcePath = "c:\\winnt\\tools\\adlogon.txt";
my $DestPath = "c:\\winnt\\temp";

 

if( Win32::CopyFile( $SourcePath, $DestPath, 1 ) )
{
  print "Successfully copied!";
}
else
{
  print "Failed to copy. Error: $^E.\n";
}

 

Reply via email to