windows-console

Application.exe is not a valid Win32 application error

限于喜欢 提交于 2020-01-01 09:11:27
问题 I have written a Console application that client is trying to run it on their Windows Server 2003 R2 machine machine and they get that error message. If I go to Build -> Configuration Manager all my projects are set to Platform of "Any CPU" and Configuration of "Release" What else I might have missed? They don't want to actually run the console application by double clicking on it, they want to give it to the Windows schedules tasks so it can pick it up and rn it on certain times 回答1:

Call to several batch files through CMD doesn't block

ⅰ亾dé卋堺 提交于 2019-12-25 08:41:18
问题 I'm trying to call several install.bat files one after another with Python trough CMD. It is necessary that each bat file be displayed in an interactive console window because it asks for some users instructions and that the python program only resume after each CMD process is resolved Each install.bat file can take a pretty long time to finish its process. My code is the following : for game in games : print("----------- Starting conversion for %s -----------" %game) subprocess.call("start

Running my C++ code gives me a blank console

喜你入骨 提交于 2019-12-25 03:58:08
问题 I'm trying to run some C++ code in Visual Studio 2015. When I build it I get no errors, but once I run it, all I get is an empty console. I don't think it froze, because I can see a flashing underscore. Also if I run it in debug mode Visual Studio just freezes. I used a simple "hello world" code: #include <iostream> int main() { std::cout << "hello world!\n"; return 0; } What I tried: I tried reinstalling Visual Studio, but it didn't fix anything. I also tried running some Python and C# code

Running my C++ code gives me a blank console

六眼飞鱼酱① 提交于 2019-12-25 03:58:01
问题 I'm trying to run some C++ code in Visual Studio 2015. When I build it I get no errors, but once I run it, all I get is an empty console. I don't think it froze, because I can see a flashing underscore. Also if I run it in debug mode Visual Studio just freezes. I used a simple "hello world" code: #include <iostream> int main() { std::cout << "hello world!\n"; return 0; } What I tried: I tried reinstalling Visual Studio, but it didn't fix anything. I also tried running some Python and C# code

windows cmd - tasklist /fi “windowtitle eq …” doesnt work [closed]

限于喜欢 提交于 2019-12-24 23:04:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I have a little problem here and wondered if someone could explain this to me :) when I type tasklist /V I get all my tasks and also the task I'm looking for: So my process does have a WINDOWTITLE and its running and seen by tasklist... but when I type tasklist /FI "WINDOWTITLE eq construction_tool_server" or

Writing to console in c#: can you single writeline with multiple colors, or lock the console to do multiple writes?

那年仲夏 提交于 2019-12-24 15:42:20
问题 I want to put a string with more than one color onto the console and have it perform as if it were a single WriteLine, as opposed to multiple writes which could get interrupted, or corrupted by other threads writing at the same time. So the post below looked like it was going in the right direction, but I do not control all the code that is writing to the console. My code is restricted to the dll that I am authoring, so I can't just go putting locks everywhere that could interfere. If it were

Windows console encoding

梦想与她 提交于 2019-12-24 14:19:18
问题 What is the default console encoding on Windows? It seems like sometimes it is the ANSI encoding (CP-1252), sometimes it is the OEM encoding (CP-850 for Western Europe by default) given by the chcp command. Command-line arguments and environment variables trigger the ANSI encoding ( é = 0xe9): > chcp 850 Active code page: 850 > python -c "print 'é'" Ú > python -c "print '\x82'" é > python -c "print '\xe9'" Ú > $env:foobar="é"; python -c "import os; print os.getenv('foobar')" Ú > chcp 1252

Is there a way for a windows-subsystem application to offer optional console output?

余生长醉 提交于 2019-12-24 12:42:20
问题 I have a Windows application application that is normally GUI-only and declares the WINDOWS subsystem. It doesn't open a console window when launched. Alas, I would like to offer additional console output when the application happens to be started from console window (say, from interactive cmd.exe). Is there a way of detecting if some process "up the chain" has an open console, and to attach to that console? The closest I've found is a way to explicitly open a console for a gui application,

How can I access command prompt history with Python [duplicate]

一笑奈何 提交于 2019-12-24 06:58:10
问题 This question already has answers here : how do you see the entire command history in interactive python? (9 answers) Closed 2 years ago . On Windows 10, Python 3.6 Let's say I have a command prompt session open (not Python command prompt or Python interactive session) and I've been setting up an environment with a lot of configurations or something of that nature. Is there any way for me to access the history of commands I used in that session with a python module for example? Ideally, I

subinacl get full output

拈花ヽ惹草 提交于 2019-12-24 02:44:38
问题 We are using the windows console program subinacl.exe to grant a user the right to stop and start a service. Therfore we use the following command: subinacl.exe /service %SERVICE_NAME% /grant=%PC_NAME%\%USER_NAME%=PTO where %SERVICE_NAME% = name of the service %PC_NAME% = name of the computer %USER_NAME% = name of the user that should become the right to start and stop the service PTO = right to start and stop the service (R would be just reading) When typing the command into the default