当前位置: 动力学知识库 > 问答 > 编程问答 >

windows - 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 not 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)

分享给朋友:
您可能感兴趣的文章:
随机阅读: