From: "Niklas Aldergren" <n.aldergren@(email surpressed)>
Subject: Re: RE: UNC paths are not supported when including some custom mel scripts
   Date: Tue, 04 Jul 2006 04:23:56 -0400
Msg# 1341
View Complete Thread (8 articles) | All Threads
Last Next
On 4 Jul 2006 01:12:56 -0000, Dylan Penhale <dylanpenhale@(email surpressed)> wrote:
|> Custom Mel:
|>
|> //print windows username
|> string $WIN_Username = `system("echo %USERNAME%")`; print ("\nCURRENT
|> WINDOWS USER:\n" + $WIN_Username);
|
|You can get to environment variables through $ENV in perl, so the above
|could be changed to string $WIN_Username = $ENV{'username'} and you
|could avoid the problem altogether.

Hi Niklas

We actually have to perform quite a few other commands after this one so
doing it in mel is necessary, however luckily we are able to use mapped
drives here too which doesn't display the error.

Hi Dylan,

sorry, it says right there it's MEL but I just assumed it was Perl! :)

However, couldn't you use the equivalent getenv('USERNAME') in MEL and
avoid the
system call?

/Niklas
--
Swiss International | www.swiss.se

Last Next