command-prompt

QProcess::startDetached() not show console window

我与影子孤独终老i 提交于 2019-12-10 22:58:30
问题 I have a GUI program that start cli program by click button. I want to see console window and don't need wait until cli program end. So I use code like this: QProcess::startDetached("cmd.exe"); After click button I don't see console window. But see cmd.exe process in task manager. I tried use system() command but it freeze my app before cli program end. Is there any way to make window visible? 回答1: It is the expected behavior. At least in Windows startDetached is equivalent to calling

Why does selecting text in a Command Prompt hang the running application?

若如初见. 提交于 2019-12-10 21:08:14
问题 We have an application that outputs logging info to stdout . However, if it is run in a command prompt window, you can use Mark to select text from the console. If you leave the text selected, the application just hangs and doesn't proceed, until you deselect the text (for example by pressing Enter to copy the selection into the clipboard). After that, the application continues normally. So it acts just like a breakpoint. Can this behaviour of the command prompt be disabled somehow? 回答1: This

cmd prompt stuck and continues on enter key press

两盒软妹~` 提交于 2019-12-10 18:51:49
问题 Does anyone come across a scenario when the command prompt is running a process and then it gets stuck and the process is also sleeping. Then when we press Enter key in the cmd window the process continues. Is there any way to avoid this? or can this be handled?? 回答1: If other processes are sucking all the cycles and have a higher prio, then your process might be stopped. A user input might just give it a prio boost, so it starts again. 回答2: I changed the line where i call the program to:

How to strip quotes from the script arguments in batch files?

混江龙づ霸主 提交于 2019-12-10 18:37:00
问题 Suppose you're writing a Batch script in which you want to strip the quotes from a string. If the string is stored in a regular Batch variable, you would do this: set name="John" echo %name:"=% If the string is stored in a positional parameter, you would do this: echo %~1 How would you go about achieving the same effect for script arguments, specifically the %* variable? When I try to use the same notation I use for positional paramters, I get this: > echo echo %~* > script.cmd > script "123"

How can I automate the process of customizing the command prompt?

半城伤御伤魂 提交于 2019-12-10 14:40:58
问题 I spend most of my time on command line ( XP / 7 ) and always find myself customizing the command prompt according to my preferences. This applies to both cmd and powershell prompt. Width: 140 Height: 40 Left: -4 Top: 20 Font: Lucida Console Font Size: 16 Text Color: RGB(100,150,200) QuickEdit Mode: Enabled Whenever I am on a new server, I would need to do this all over again. How can I automate this process by putting these parameters in a batch file or PowerShell script? 回答1: You can use

How to save Python coding in Command Prompt as a file?

让人想犯罪 __ 提交于 2019-12-10 13:52:29
问题 I just typed an example from a book in Python34 of a running Command Prompt. but now I want to save this python program as file for future uses. Since I have never used Command Prompt before and I also searched online but most of them cannot answer. Can anyone show the solution here? Thanks. 回答1: You can save lines in ipython using %save: Usage: %save [options] filename n1-n2 n3-n4 ... n5 .. n6 ... Options: -r: use ‘raw’ input. By default, the ‘processed’ history is used, so that magics are

Dot-slash not recognized in command prompt - Trying to install Python module

只愿长相守 提交于 2019-12-10 13:27:23
问题 I am trying to install a Python module in command prompt. The directions state to run "./configure" to install the module and then run a make command. However, whenever I do that, I receive the error '.' is not recognized as an internal or external command, operable program or batch file. I am still relatively new to using Command Prompt and Python, so this could be a very novice issue. From what I've read from other questions, it seems that command prompt should automatically recognize the .

Is there a way to identify the Windows command prompt regardless of file name or location?

只愿长相守 提交于 2019-12-10 12:37:28
问题 I'm writing a program to immediately track and kill when a user runs command prompt (and regedit if that's possible). This is to stop users from running commands I would rather they not have. I've already written code that sees when a process is launched and checks its name using QueryFullProcessImageName. The issue is that if someone were to rename command prompt then I could no longer detect it via process name. The way I detect command prompt is currently "\cmd.exe" but clearly this is not

Cannot connect to localhost with cURL on Command Prompt

吃可爱长大的小学妹 提交于 2019-12-10 12:25:44
问题 I've just installed cURL on my hard-drive in order to use for testing with my localhost (on the command prompt). However I cannot connect to any port. You can see the directory and my input below: C:\Users\me\curl\src>curl -v http://localhost:9000 which gives me: Rebuilt URL to: http://localhost:9000/ timeout on name lookup is not supported Trying ::1... TCP_NODELAY set Trying 127.0.0.1... TCP_NODELAY set connect to ::1 port 9000 failed: Connection refused connect to 127.0.0.1 port 9000

Execute shell command in c++

放肆的年华 提交于 2019-12-10 12:24:53
问题 I have a question regarding executing shell commands in c++. I'm building an application in winforms, vs 2008. My application has a button, when clicked should decode a binary file to a .csv file. I can decode files by first going to the right directory (cd Test_Copy2) and then execute a command in the command prompt (java -jar tool.jar -b x.fit x.csv). I tried a lot of different stuff but unfortunately got none to work! I tried using: system, _popen, ShellExecute(NULL, L"open", L"C:\\WINDOWS