Re: Edit Windows PATH
On Fri, 1 Jan 1988, amr wrote:
> Do we have Perl script that can edit & add to the Windows (XP, 2000) path.?
Is there a reason that a simple system() command won't work here?
my $status = system( "SET PATH=%PATH%;$new_path" );
die "Couldn't set %PATH%: $!" if $status;
Normally I'm opposed to using system commands when the task can be done
either all in Perl or with a platform- and problem- specific module, but
in this case, the cmd shell's SET command is easy to run directly, so
why not just solve the problem that way?
--
Chris Devers
.
Relevant Pages
- Re: Enviroment Variables issue
... I am having trouble with system commands from the command prompt or ... If I try to run a system command, such as ping, traceroute, ... (microsoft.public.windowsxp.general) - Re: writing array to file?
... to three system commands, it would be: ... You seem unusually dependent on shelling out to external programs. ... Perl is more than a shell scripting language. ... This says to run the command between ``, ... (comp.lang.perl.misc) - Re: Moving command.com out of system32 directory
... > What is the rationale for moving the dos command shell out ... system commands on your system if they know or can guess the location of the ... [CMD.EXE is the DOS shell that comes with Windows ... (microsoft.public.inetserver.iis.security) - Re: OSR5: how to find out disabled terminals by authorization subsystem?
... "ttyunlock" system commands, which work great. ... any command to see which tty*'s have fallen under the security lock. ... how can I find out from a pure command line which terminals are locked? ... (comp.unix.sco.misc) - Accesing structures data (getting lengthy!)
... > assignment statement just won't stand out amongst all the other ... > meaningless dummy variables that you have to keep track of. ... > comparitively easy to pick out of a long, boring, command line history, ... > original, for some reason, wraps me up in knots. ... (comp.soft-sys.matlab) |
|