Script works in CLI, but not GUI 
Author Message
 Script works in CLI, but not GUI

I'm using PERL 5.001 with NT 4.  I wrote a simple test script called test.bat,
it looks like:

perl -w -S "%0" %*

print "testing\n";
$x=<STDIN>;

__END__
:endofperl

When I ran it from a DOS prompt it works fine, but if I double click it in
Windows Explorer I get a message saying "Cannot execute c:\test.bat" or
something like that.  Perl.exe is in my path, and using the full path of
perl.exe doesn't help either.  Has anyone seen anything like this?

Thanks a lot.



Sun, 16 May 2004 22:09:00 GMT  
 Script works in CLI, but not GUI

Quote:

> I'm using PERL 5.001 with NT 4.  I wrote a simple test script called
test.bat,
> it looks like:



> perl -w -S "%0" %*
> goto endofperl

> print "testing\n";
> $x=<STDIN>;

> __END__
> :endofperl

> When I ran it from a DOS prompt it works fine, but if I double click it in
> Windows Explorer I get a message saying "Cannot execute c:\test.bat" or
> something like that.  Perl.exe is in my path, and using the full path of
> perl.exe doesn't help either.  Has anyone seen anything like this?

> Thanks a lot.

Your test script worked fine for me on ActiveState Perl 5.6.1 on Windows NT.

but apart from that it printed 'testing' and then waited for input before
exiting.
Since version 5.001 is kinda old, it would be worthwhile updating to a more
recent version before troubleshooting further.

http://www.activestate.com/

Hope that helps.

Andrew



Mon, 17 May 2004 10:45:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. not to create console with Win32::GUI script?

2. Send mail script not working in 2nd server but working in 1st server

3. Send mail script not working in 2nd server but working in 1st server

4. My <!--#exec cgi="\scripts\script.pl"-->command will not work

5. DBI and DBD::Informix - LD_LIBRARY_PATH does not work with suid perl script

6. small script not working

7. Perl Script Form Code out of book not working

8. Perl script to delete files works but not in Crontab

9. If statement in perl script not working!

10. perl script not working right

11. simple script using Net::Telnet not work on HP-UX

12. IIS running perl scripts with VB not working

 

 
Powered by phpBB® Forum Software