Sign in to follow this  
Followers 0
TheoNeandonly

What are /c and /k ???

7 posts in this topic

#1 ·  Posted (edited)

In the help file's FAQ, regarding "running a DOS program", the example given uses "/c" as the first parameter after @ComSpec. And in the Macro reference, under @Comspec, there's a "/k" shown in the same place. What the heck are these? I tried looking it up everywhere, but no dice.

Edited by TheoNeandonly

Share this post


Link to post
Share on other sites




Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

/c   ontinue          exit cmd window

/k   eep                remain in cmd window

Edited by Exit
1 person likes this

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

That's odd:
 

Here an extract from that site:

Cmd
Starts a new instance of the command interpreter, Cmd.exe. Used without parameters, cmd displays Windows XP version and copyright information.
Syntax
cmd [[{/c|/k}] [/s] [/q] [/d] [{/a|/u}] [/t:fg] [/e:{on|off}] [/f:{on|off}] [/v:{on|off}] string]
Top of pageTop of page
Parameters
/c : Carries out the command specified by string and then stops.
/k : Carries out the command specified by string and continues.
/s : Modifies the treatment of string after /c or /k.
/q : Turns the echo off.
/d : Disables execution of AutoRun commands.
/a : Creates American National Standards Institute (ANSI) output.
/u : Creates Unicode output.
/t:fg : Sets the foreground f and background g colors. The following tables lists valid hexadecimal digits that you can use as the values for f and g.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Thank you, never say never. And company, lol. I didn't go looking for cmd.exe switches because when I tried it in my own command prompt, Windows told me it didn't recognize it. But I see now it's a parameter that has to be given to cmd.exe itself.

Edited by TheoNeandonly
1 person likes this

Share this post


Link to post
Share on other sites

Yes, it is a Windows DOS thing, not an AutoIt one.

Exit has the right of it, where essentially, if you use /k instead of c/, processing is paused waiting for a response from you.

This is very useful when troubleshooting from without the DOS environment (i.e. running from a batch command within Windows in a bat file). If you don't use it, you usually miss out on seeing reported errors from dos executables.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0