> I know it's not a GUI question, but I don't have any other choice:
>
> This is regading the Desktop functions in the AdminMisc Module.
> I have simplified the example that came with the module,
> but I still can't get it to work.
> The original example doesn't work either.
>
> The problem is with the CreateProcess function.
> For some reason, it isn't running the process.
> GetLastError is returning "The handle is invalid"
>
> I think I have tried everything, what have I missed???
>
> Code:
>
> use Win32;
> use Win32::AdminMisc;
>
> $DT = "test";
>
> print "Creating $DT:\n";
> $DeskTopHandle = Win32::AdminMisc::CreateDeskTop( $DT );
> print "\tCreated the $DT desktop at $DeskTopHandle!\n";
> print "\t?=" . Win32::FormatMessage( Win32::GetLastError() ) . "\n";
>
> print "Switched to $DT:\n";
> Win32::AdminMisc::SwitchDeskTop( $DT );
> print "\t?=",Win32::FormatMessage( Win32::GetLastError() ), "\n";
>
> print "Creating Process on $DT:\n";
> $pid = Win32::AdminMisc::CreateProcess("explorer.exe /NoUI",
> Desktop=>"test",);
Did you try?
Desktop => $DeskTopHandle
?
I don't have this version of Win32::AdminMisc here so I can't test
myself ...
Jenda
== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
The phenomenon of UFO doesn't say anything about
the presence of intelligence in space.
It just shows how rare it is here on the earth.
A.C.Clarke