- Code: Select all
#!C:/perl/bin/perl.exe
system ( "C:/WINDOWS/system32/shutdown.exe", "-r");
But the same code altered to logoff the user does not work:
- Code: Select all
#!C:/perl/bin/perl.exe
system ( "C:/WINDOWS/system32/shutdown.exe", "-l");
I get the error - "Incorrect Function". From a DOS console, I can restart or logoff the user using the shutdown command and the-r and-l flags respectively.
I am using XAMPP for hosting the CGI file, and using a separate installation of ActivePerl to execute the scripts.
Can some help me with this?
Thanks.
Ashwin