cmd

C# Console Application - cmd.exe hangs

狂风中的少年 提交于 2021-02-19 03:33:09
问题 I am having issues with running a simple C# Console Application in Visual Studio 2013. Details of my problem: I was running Console Applications successfully with the default "Press any key to continue" displaying cleanly at the end. Suddenly it started behaving differently with the following symptoms: A new command window (cmd.exe) opening alongside my Console Application (this wasn't happening in the past) My Console Application closing abruptly without the default clean "Press any key"

Git add through python subprocess

99封情书 提交于 2021-02-19 01:06:52
问题 I am trying to run git commands through python subprocess. I do this by calling the git.exe in the cmd directory of github. I managed to get most commands working (init, remote, status) but i get an error when calling git add. This is my code so far: import subprocess gitPath = 'C:/path/to/git/cmd.exe' repoPath = 'C:/path/to/my/repo' repoUrl = 'https://www.github.com/login/repo'; #list to set directory and working tree dirList = ['--git-dir='+repoPath+'/.git','--work-tree='+repoPath] #init

cmd- comma to separate parameters Compared to space?

我是研究僧i 提交于 2021-02-18 22:41:49
问题 I have some questions on the subject, of commas compared to space, in delimiting parameters. They are questions that C programmers familiar with the cmd prompt, may be able to throw some light on.. I know that when doing c:\>program a b c there are 4 parameters [0]=program [1]=a [2]=b [3]=c According to hh ntcmds.chm concepts.. Shell overview ; and , are used to separate parameters ; or , command1 parameter1;parameter2 Use to separate command parameters. I see dir a,b gives the same result as

cmd- comma to separate parameters Compared to space?

眉间皱痕 提交于 2021-02-18 22:41:13
问题 I have some questions on the subject, of commas compared to space, in delimiting parameters. They are questions that C programmers familiar with the cmd prompt, may be able to throw some light on.. I know that when doing c:\>program a b c there are 4 parameters [0]=program [1]=a [2]=b [3]=c According to hh ntcmds.chm concepts.. Shell overview ; and , are used to separate parameters ; or , command1 parameter1;parameter2 Use to separate command parameters. I see dir a,b gives the same result as

Disable cmd and PowerShell on Windows Server 2012 for clients

こ雲淡風輕ζ 提交于 2021-02-18 14:40:22
问题 I'm using Windows Server 2012, and I want to disable the cmd and the PowerShell for the clients. I've searched in the Group Policies but i didn't find where I can do this. Please can somebody help me? 回答1: Disable access to powershell: In the Group Policy window for those users, on the left-hand side, scroll down to User Configuration > Administrative Templates > System > Don’t run specified Windows applications. In the properties window that opens, click the “Enabled” option and then click

Disable cmd and PowerShell on Windows Server 2012 for clients

折月煮酒 提交于 2021-02-18 14:37:37
问题 I'm using Windows Server 2012, and I want to disable the cmd and the PowerShell for the clients. I've searched in the Group Policies but i didn't find where I can do this. Please can somebody help me? 回答1: Disable access to powershell: In the Group Policy window for those users, on the left-hand side, scroll down to User Configuration > Administrative Templates > System > Don’t run specified Windows applications. In the properties window that opens, click the “Enabled” option and then click

pass parameter from jenkins parameterized build to windows batch command

我与影子孤独终老i 提交于 2021-02-17 21:29:52
问题 I am starting to use Jenkins, which is a really great tool. We are using parameterized build, we define parameter such as branch name ${Branch} (e.g. dev, release, main etc). In the build config, I can add a windows batch command, is there a way I can pass down these parameters to the batch command? I tried to pass like "%${Branch}%" or "%Branch%", but seems not working. Can anyone help? Many Thanks 回答1: Using Parameterized Build , you need to define parameters. The value of these will be

pass parameter from jenkins parameterized build to windows batch command

Deadly 提交于 2021-02-17 21:26:33
问题 I am starting to use Jenkins, which is a really great tool. We are using parameterized build, we define parameter such as branch name ${Branch} (e.g. dev, release, main etc). In the build config, I can add a windows batch command, is there a way I can pass down these parameters to the batch command? I tried to pass like "%${Branch}%" or "%Branch%", but seems not working. Can anyone help? Many Thanks 回答1: Using Parameterized Build , you need to define parameters. The value of these will be

How do i run a python program just by typing the script name on windows 10 cmd line?

戏子无情 提交于 2021-02-17 06:49:34
问题 How do i run a python program just by typing the script name on windows 10 cmd line? Also without having to change directory. I already added my scripts folder and python folder to the path. tried also tu run assoc py.=PythonScript ftype PythonScript=python.exe %1 %* Here's the program's content: #! python3 # mapIt.py - Launches a map in the browser using an address from the command line or clipboard import webbrowser, sys, pyperclip if len(sys.argv) > 1: address = ' '.join(sys.argv[1:]) else

How to run multiple commands in one batch file?

£可爱£侵袭症+ 提交于 2021-02-17 06:15:07
问题 I want to run multiple commands in one batch file. I tried the &, &&, start, /wait, call, :begin and goto begin commands but no luck. Here are my commands: C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f sc config remoteregistry start= auto sc start remoteregistry sc config Schedule start=auto sc start Schedule sc stop McAfeeFramework sc configure McAfeeFramework startup= disabled sc