[rt.cpan.org #50009] Extension for Win32-Job to run processes with different account

[email protected] ("[email protected] via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Fri Sep 25 03:43:28 2009: Request 50009 was acted upon.
Transaction: Ticket created by [email protected]
       Queue: Win32-Job
     Subject: Extension for Win32-Job to run processes with different account
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: new
 Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=50009 >



Hi,
I made 2 extensions:
- a change to use CreateProcessAsUser. It is triggered by use of "user" in
the parameter.
- a possibility to leave the started job running on parent process exit

I use "Visual C++ 2008 Express edition" to compile the module. Let me know
if there is a problem with other compilers.

The attached archive contains the modified files and a new
sample_as_user.pl. Sample_as_user.pl does exactly the same like sample.pl
as a different user, asks for login information and starts notepad and
regedit on the desktop of the calling process and notepad on a different
desktop.

Currently the restrictions are:
- if the user for the child process has a roaming profile, the module will
not load this profile.
- the USERPROFILE environment variable will be set to a empty string

Bye
Torsten

(See attached file: Win32-Job-0.03.zip)
Win32-Job-0.03.zip (application/zip, 16.3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.