How Symfony did its command alias?
Apologies my french english ...
I would like to create an alias in Windows XP cmd, like Symfony.
This code works perfectly, but resets every system boot :
doskey kCLI= php C:\wamp\www\KinkamaCLI\KinkamaCLI.php
I tryed to put a .bat in "start" folder, but I think it's no开发者_运维问答t beautifull, and I feel it doesn't work, because I can't see the generate batch file :
echo doskey kCLI= php C:\wamp\www\KinkamaCLI\KinkamaCLI.php >> C:\Documents and Settings\sartois\Menu Démarrer\Programmes\Démarrage\kCLI.bat
I would to create a permanent alias. Enter :
kCLI my-command-here
And not :
php C:\wamp\www\KinkamaCLI\KinkamaCLI.php my-command-here
I don't know how symfony proceed, but may be you should check your %PATH% environment variable and add this new path. Check http://support.microsoft.com/kb/310519 on how to modify this variable.
cmd.exe has support for running a list of commands at startup, add your doskey command to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\AutoRun
(Note that it is possible to start cmd.exe with /D to skip the autorun entry. I have also seen problems with doskey.exe crashing in 3rd party apps when autorun entry is parsed)
精彩评论