I'm running a Perl CGI script, served by IIS which launches a second (non-CGI) script to read and write to a network share. I've set up the first script to run under Anonymous Access and set up a special user ID to be the Anonymous account, thinking that it would pass this onto the second script so that it could access the network share. But it doesn't - I get a permissions error when trying to read a file from the share.
Does anyone know how I can run the second script under the special user ID I created? Can I pass the user ID from the parent script onto the child script? Or can I run the second script and change the user ID it's running under, with actual Perl code?