According to http://ss64.com/nt/doskey.html , "You cannot run a Doskey macro from a batch file"
I'm guessing it is because Doskey works with the command interpreter level which presumably isn't available in batch files. Richard. On Sun, 12 Apr 2015 at 17:59 Ankit Singhal <[email protected]> wrote: > Anyone?? > > On Saturday, April 11, 2015 at 9:22:37 AM UTC+5:30, Ankit Singhal wrote: >> >> Hi All >> >> We have build script which sets a doskey for certain commands. >> >> Jenkins somehow is not able to recognize doskey: >> >> Problem is easily reproducible, >> >> *Script: foo.bat* >> ==================== >> doskey d=dir >> >> ======================= >> >> *Jenkins : Execute Windows batch command* >> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> call foo.bat >> d >> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> Failure output >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> C:\Code\workspace\Windows-Trunk\src>call foo.bat >> >> C:\Code\workspace\Windows-Trunk\src>doskey d=dir >> >> C:\Code\workspace\Windows-Trunk\src>d >> 'd' is not recognized as an internal or external command, >> operable program or batch file. >> >> C:\Code\workspace\Windows-Trunk\src>exit 9009 >> Build step 'Execute Windows batch command' marked build as failure >> Finished: FAILURE >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> Any idea why? >> >> Regards >> Ankit >> > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/f2a29605-dbc6-45d9-8d0a-22eb5dfb6949%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/f2a29605-dbc6-45d9-8d0a-22eb5dfb6949%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMui945Q-Ax7QZ3vrOEsytPf9ozOQmrhmZArmLp1cDMxsTDvmg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
