I never have had much luck with some administrative modules over the web, however if
you're using IIS just make sure the IUSR account on the web server has permission to
the share, which C$ is a hidden share. There also might be some user rights that IUSR
needs. It's something you'll have to play around with. Hopefully you're the Admin on
the box.
Stanley G. Martin
Midwest Consulting Group
Sprint Platform & Strategy Mgmt
913.315.3133
[EMAIL PROTECTED]
-----Original Message-----
From: jztiger [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 1:13 PM
To: perl-win32-web
Cc: jztiger
Subject: Win32::Lanman from WEB
I have a perl script that I want to run from a web server. It runs just fine
from a command prompt, but I need to be able to call it from a web page.
For example, I need to click on a link and it map a drive and stop an NT
service. If the perl script is called from a web browser running on the
machine that the web server is on, everything works fine. But if it is
called from a different machine it does not work... Any ideas?
***********************
Here is a sample of what I am doing.
require "cgi-lib.pl";
print "HTTP/1.0 200 OK\n" if $ENV{"PERLXS"}=~/PerlIS/i;
print "Content type: text/html\n\n";
print "<body>";
print "<p><img border='0' src='../sailogo.gif' width='600'
height='83'></p>";
print "<p align='left'><font face='Book Antiqua' size='6'>Test Site for TSM
Service restarting</font></p>";
print "<p> </p>";
use Win32::NetResource;
$User = "administrator";
$Password = "blahblah";
%NetResource = (
LocalName => "X:",
RemoteName => "\\\\1.2.3.4\\c\$"
);
Win32::NetResource::AddConnection ( \%NetResource, $Password,$User);
print "Done";
*********************************
The code runs fine, it just doesn't map the drive.
_______________________________________________________
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web