windows-console

Embedding a DOS console in a windows form with Visual Basic

前提是你 提交于 2019-12-11 02:48:38
问题 I've managed to find from other questions some data that allows me to achieve the next code: Imports System.Runtime.InteropServices Public Class Form1 <DllImport("user32.dll")> _ Public Shared Function MoveWindow(ByVal hWnd As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal bRepaint As Boolean) As Boolean End Function <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _ Public Shared Function SetParent(ByVal hWndChild

How to apply coloring/formatting to the displayed text in input()-function (similar to print statement formatting)?

落爺英雄遲暮 提交于 2019-12-10 13:17:14
问题 I have a small game application, which is started from the Windows console (cmd.exe). I am able to format the text in any desired way using ANSI escape sequences. I would also love to apply formatting to the text from the input() -method, but I have not found a way how to do so. Here is the testing code... from colorama import init init(autoreset=True) RED = "\x1b[1;31;40m" print(f"{RED}This text is red\n") not_red = input(f"{RED}Insert some random stuff: ") in my windows console, you will

Permanent removal of logo in Windows Scripting Host (WSH) scripts

空扰寡人 提交于 2019-12-10 07:53:08
问题 I know two ways to remove the logo permanently. The "official" one: cscript //Nologo //S Will save current command line options for current user. A ftype approach with admin privileges: ftype wsffile="%SystemRoot%\System32\CScript.exe" //nologo "%%1" %%* ftype jsfile="%SystemRoot%\System32\CScript.exe" //nologo "%%1" %%* ftype vbsfile="%SystemRoot%\System32\CScript.exe" //nologo "%%1" %%* Double- % 's are needed only if you use the lines in a batch file. The latter will all users via affect

How do you stop a Windows Batch file from exiting early?

蓝咒 提交于 2019-12-10 00:38:14
问题 I have a windows batch file that looks similar to: C:\DoStuff.cmd move output.bak C:\newfolder\output.bak The problem i have is that DoStuff.cmd executes a java program that once complete exits the batch run back to the command prompt. Line 2 never gets hit. i have tried the following instead to execute the command in a new window: start "My program" /WAIT C:\DoStuff.cmd move output.bak C:\newfolder\output.bak What happens with the above is that the new command window spawns the cmd file runs

How to execue PHP scripts in the background using EXEC() and CMD

亡梦爱人 提交于 2019-12-09 00:58:30
I can't use the $com = new Com('WScript.shell'); way, it's causing problems on my system. Probably I need to upgrade my PHP because it's very old (5.2), but I suppose what I'm trying to do is not version dependent. I'm running PHP on Windows 2008 64-bit. Where I can run a command prefixed with start to run the command on a separate console. start php myscript.php If this is executed from the command line, it starts a new console for the script. I need to do the same from PHP using exec only . exec("CMD /C start php myscript.php"); /C is to terminate the CMD session when the script finishes.

How to checkout project from head using CVS command using windows command prompt

对着背影说爱祢 提交于 2019-12-08 05:29:49
问题 I searched extensively to resolve my issue, However could not find any solution. Requirement: Need to checkout ADM project from HEAD. CVS server name : cvs02dv ( CVS is installed on windows ) CVS server directory: c:\cvs\dev (The location were all the files can be accessed using eclipse or any CVS client tool like smartCVS) Project to be checked out from HEAD: ADM Using eclipse I can access the files using pserver:user@cvs02dv:c:\cvs\dev I downloaded CVS client from below site, Unzipped in D:

Python terminal window popping up at pygame app run [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-08 03:47:18
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How can I hide the console window in a PyQt app running on Windows? When I double-click in Windows on my pygame app (.py) the desired pygame window opens, but always along with it, an empty terminal window pops up. How can I prevent this? 回答1: Change the file extension of your file from .py to .pyw . See Using the Python Interpreter: 2.2.2. Executable Python Scripts The Python installer automatically associates

Multiple console windows from one Win32 console app

五迷三道 提交于 2019-12-08 01:30:29
问题 I've written a program based on an empty Win32 console app in VS2008 running on Win7 64bit. The program is entirely menu based spawning from a main.cpp which only calls external functions that lead to other interfaces based on the users needs (e.g. cashier, inventory, report, etc...). What I would love to do is provide a new console window for each interface. Ideally it would close the main menu upon invoking any other interfaces and so on as the user progresses through its functions,

How to deal with output from console applications that use control characters?

南楼画角 提交于 2019-12-08 01:01:54
问题 I want to call an executable (in my case, this is PNGOUT.exe) and grab its output from stdout. But it turned out to be tricky - the application uses some sort of control characters to replace previously printed output (display of progress), and C# classes happily record them and when I want to analyze the output string, I get serious headache. (It even took a while for me to figure out what's happening with my string) I'm calling executable with following method: public static string

git help in Windows command prompt

非 Y 不嫁゛ 提交于 2019-12-06 21:52:13
问题 The git help command on Windows ( msysgit distribution) spawns web browser each time I run it. I tried git help -m which reports "No manual entry for ..." and git help -i which says "info: Terminal type 'msys' is not smart enough to run Info." The same happens in bash under Cygwin . Is there any sensible way to get light-weight help in cmd terminal? 回答1: Update for Git 2.x (June 2017, Git 2.13.1) You still don't have man: > git -c help.format=man help add warning: failed to exec 'man': No