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

I need to spawn a process that is an ads stream on multiple languages like german, japanese with unicode name. The exe that needs to be spawned have german and/or japanese chars. I was using Win32::OLE to run it. It works fine on xp, but on vista it works fine for regular file, but not for ADS (alternate data streams) file. System command or Win32::Process::Create does not work with unicode chars. Here is my sample code, the exe name is read from an xml file.
use XML::Simple; use Win32::OLE qw(in); Win32::OLE->Option(CP => Win32::OLE::CP_UTF8); my $config = XMLin("C:\\Config.xml"); my $pso = Win32::OLE->new("Wscript.Shell"); my $err = $pso->run($config->{cmdLine},1,1);
Is there a workaround for this issue? I would really appreciate any help.

Replies are listed 'Best First'.
Re: Spwaning a unicodename ADS file on vista
by Anonymous Monk on May 20, 2009 at 09:52 UTC
    Use Win32::GetANSIPathName(FILENAME) to to get a name that can be passed to system calls and external programs.. Not sure, but I think it expects filename to be in cwd, or a fullpath.
      It is working on atleast one of my scenario. It seems this needs active perl upgrade (I am using 5.8.7). I will update after testing it for different scenarios (I need some more time because i have some other urgent issues.

      Thank you very much for your help.