psaraogi has asked for the wisdom of the Perl Monks concerning the following question:

Win32::Process::Create() not working on windows 2008 64 bit machine It returns none. It is working finr on windows 2003 32 bit machine
$client = client.exe #Already added in PATH $rc = Win32::Process::Create($client_process, "$client", "$newcmd", 0, CREATE_NEW_CONSOLE, "."); $client_pid = $client_process->GetProcessID(); print "\n After new window console $client_pid \n
Output:-
After new window console 0

Replies are listed 'Best First'.
Re: Win32::Process::Create() not working on windows 2008 64 bit machine
by Anonymous Monk on Sep 29, 2011 at 07:02 UTC
Re: Win32::Process::Create() not working on windows 2008 64 bit machine
by wwe (Friar) on Sep 30, 2011 at 12:27 UTC
    this example code from module documentation Win32::Process works fine on Win7 x64. As Win 7 and Server 2008 shares most of internal code this should work fine on 2008 too.
    use strict; use warnings; use diagnostics; use Win32::Process; use Win32; sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); } my $ProcessObj; Win32::Process::Create($ProcessObj, "C:\\windows\\system32\\notepad.exe", "notepad temp.txt", 0, NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport(); $ProcessObj->Suspend(); $ProcessObj->Resume(); $ProcessObj->Wait(INFINITE);