views:

94

answers:

2

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
+2  A: 

Hi,

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.

Patrick MARIE
Thanks,I progress. I create a script installer, .bat, and I would like to know how to call doskey in it.Because that work in direct input :doskey kCLI= php C:\wamp\www\KinkamaCLI\KinkamaCLI.phpthendoskey /macros >> "C:\Documents and Settings\%login%\Menu Démarrer\Programmes\Démarrage\kCLI.bat"But when I put that in the .bat, it doesn't work.
Sylvain Artois
A: 

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)

Anders