Skip Menu |

This queue is for tickets about the Win32-Process CPAN distribution.

Report information
The Basics
Id: 78208
Status: resolved
Priority: 0/
Queue: Win32-Process

People
Owner: Nobody in particular
Requestors: stefanos [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.14
Fixed in: (no value)



Subject: how use with CREATE_NO_WINDOW and without in one script?
how use with CREATE_NO_WINDOW and without in one script? Workaround with win32::gui with Win32::GUI::Hide and Win32::GUI::Show works but is not really good solution. Better solution possible? example as attachment
Subject: win32process.pl
#!/usr/bin/perl use Win32::Process qw(NORMAL_PRIORITY_CLASS CREATE_NO_WINDOW); Win32::Process::Create($ProcessObj, "C:\\Windows\\System32\\echo.exe", "", 0, NORMAL_PRIORITY_CLASS, "."); delete $INC{'Win32/Process.pm'};#not work? use Win32::Process qw(NORMAL_PRIORITY_CLASS CREATE_NEW_CONSOLE);# not without CREATE_NO_WINDOW ? Win32::Process::Create($ProcessObj, "C:\\Windows\\System32\\echo.exe", "", 0, NORMAL_PRIORITY_CLASS, "."); exit;
You've misunderstood how CREATE_NO_WINDOW & CREATE_NEW_CONSOLE work. They're just constants that should be included as part of the $cflags (using the | operator). Simply including them as part of the import list doesn't do anything except create the constant. use Win32::Process qw(NORMAL_PRIORITY_CLASS CREATE_NO_WINDOW CREATE_NEW_CONSOLE); Win32::Process::Create($ProcessObj, "C:\\Windows\\System32\\echo.exe", "", 0, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, "."); Win32::Process::Create($ProcessObj, "C:\\Windows\\System32\\echo.exe", "", 0, NORMAL_PRIORITY_CLASS|CREATE_NEW_CONSOLE, ".");
oh yes, my fault, sorry. Thanks for the help.