Perl2bat creates the batch file below. However, running it on my local machine does not delete the registry key. Is there anything I'm missing?
@rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S %0 %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; #!C:\perl\bin\perl #line 15 use Win32::Registry $HKEY_LOCAL_MACHINE->DeleteValue($AutoShareWks); Win32::Registry::DeleteValue('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe t\Services\lanmanserver\parameters', $AutoShareWks); __END__ :endofperl Arthur -----Original Message----- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 11:31 AM To: DiSegna Arthur Subject: RE: Editting the registry? From: <[EMAIL PROTECTED]> > I have a Quick question about running the script as a logon script in > Windows using Active Directory. How? When the user logs on the script > is run local. Obviously, I need Perl installed on the server to > interpret locally run scripts. If the user doesn't have Perl installed > locally how will it execute? Do I need to encapsulate the script > inside of WSH? What are the other W2k admins doing? I am currently > searching for an answer now (google) but thought I would throw it on > the list as well. You can install Perl on a server share and then wrap the script in a .BAT (using the pl2bat script installed with ActivePerl) and map a drive letter to the share as the first thing in the BAT and then run the script. That's what I used to do when I was an admin. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>