batch-file

Batch file giving invalid path error while creating an installer

隐身守侯 提交于 2021-01-28 18:35:50
问题 Basically I am trying to create an installer. I have an EXE file and I need to do the following steps through a bat file: create a folder at C:\Data Copy a file in C.\Data Create a folder inside C:\Program Files Copy exe file in C:\Program Files\My Project Folder Create shortcut to exe on Desktop My code is as follows: @echo off if not exist "%PROGRAMFILES%\MyFolder" mkdir %PROGRAMFILES%\MyFolder if not exist "C:\Data" mkdir C:\Data copy /q /y ".\MyFile.exe" "%PROGRAMFILES%\MyFolder\MyFile

Batch file giving invalid path error while creating an installer

人走茶凉 提交于 2021-01-28 18:08:36
问题 Basically I am trying to create an installer. I have an EXE file and I need to do the following steps through a bat file: create a folder at C:\Data Copy a file in C.\Data Create a folder inside C:\Program Files Copy exe file in C:\Program Files\My Project Folder Create shortcut to exe on Desktop My code is as follows: @echo off if not exist "%PROGRAMFILES%\MyFolder" mkdir %PROGRAMFILES%\MyFolder if not exist "C:\Data" mkdir C:\Data copy /q /y ".\MyFile.exe" "%PROGRAMFILES%\MyFolder\MyFile

Launch a .bat from Jenkins does not work

荒凉一梦 提交于 2021-01-28 18:00:30
问题 This is the .bat file : start cmd.exe /k "C:\Users\etudes.ext46\AppData\Local\Android\sdk1\tools\emulator.exe -avd ff &" ping 127.0.0.1 -n 60 > nul start cmd.exe /k "adb shell input keyevent 82" start cmd.exe /k "node "C:\Program Files\Appium\node_modules\appium\bin\appium.js" -a 127.0.0.1 -p 4723 &" ping 127.0.0.1 -n 30 > nul C:\Users\etudes.ext46\Downloads\NUnit-2.6.4\NUnit-2.6.4\bin\nunit-console.exe C:\Users\etudes.ext46\Downloads\NUnit-2.6.4\NUnit-2.6.4\bin\apk\UnitTestProject1.dll start

Create a batch file to change the power options in Windows 7

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 15:07:51
问题 Is there a way to create batch file and place it on the desktop to change the power options in Windows 7? Specifically I have the computer set to sleep after 30 minutes. Now that I use "Serve To Me/Stream To Me" apps I want to quickly be able to change the power settings to allow continuous operation and then quickly change the power settings back to 30 minute sleep when i'm done using the streaming apps. How is this done? Can it be done? Thanks Gary 回答1: Create or modify the power schemes

Create a batch file to change the power options in Windows 7

纵然是瞬间 提交于 2021-01-28 14:52:55
问题 Is there a way to create batch file and place it on the desktop to change the power options in Windows 7? Specifically I have the computer set to sleep after 30 minutes. Now that I use "Serve To Me/Stream To Me" apps I want to quickly be able to change the power settings to allow continuous operation and then quickly change the power settings back to 30 minute sleep when i'm done using the streaming apps. How is this done? Can it be done? Thanks Gary 回答1: Create or modify the power schemes

Create a batch file to change the power options in Windows 7

戏子无情 提交于 2021-01-28 14:50:38
问题 Is there a way to create batch file and place it on the desktop to change the power options in Windows 7? Specifically I have the computer set to sleep after 30 minutes. Now that I use "Serve To Me/Stream To Me" apps I want to quickly be able to change the power settings to allow continuous operation and then quickly change the power settings back to 30 minute sleep when i'm done using the streaming apps. How is this done? Can it be done? Thanks Gary 回答1: Create or modify the power schemes

Running git fetch in batch file via c# process hangs up

て烟熏妆下的殇ゞ 提交于 2021-01-28 13:36:44
问题 I am trying to run several git commands via c# and continuing to work with the resulting outputs. I wrote this little Method to work with: private string runGitCommand(string gitCommand, string path) { ProcessStartInfo processInfo = new ProcessStartInfo(); processInfo.FileName = System.Windows.Forms.Application.StartupPath+"\\gitcommand.bat"; processInfo.WindowStyle = ProcessWindowStyle.Hidden; processInfo.Arguments = gitCommand; processInfo.CreateNoWindow = true; processInfo.UseShellExecute

Batch - Zigzag merging with two files

隐身守侯 提交于 2021-01-28 12:00:32
问题 I would like to make a zigzag merging of two text files as following. I have two files in input: file1.txt A A A and file2.txt B B B I would like to have as output: output.txt A B A B A B Can anyone please tell me which may be the simpliest way to do this in batch (I'm forced to use this native windows langage). Thank you! 回答1: If we can assume that the number of lines in both files is equal, this will work: @ECHO OFF TYPE NUL>output.txt SETLOCAL ENABLEDELAYEDEXPANSION SET linecount=0 FOR /F

How to run multiple js servers

拜拜、爱过 提交于 2021-01-28 11:03:28
问题 I'm developing a discord bot for discord at the moment, and to run the bot, I have a few different files. I've run into some problems along the way that all ended up having the same fix, or at least the only fix that I could come up with. That fix would be, instead of running them in my main file (index.js), I could just run 3 separate batch files using nodemon (https://www.npmjs.com/package/nodemon). I currently have 3 batch files to do so. Those batch files look like this: nodemon index.js

Is it possible to change the directory of a windows console from an app?

こ雲淡風輕ζ 提交于 2021-01-28 10:45:45
问题 My goal is to write an app that lets you quickly assign aliases to long directory paths and change to them. I wrote an app that manages them in a file in the user's appdata directory, but I can't find a way to change the directory of the shell I run the program in from my app. My goal is to have it work from git bash, cmd.exe, and powershell. I want something like this: cd /c/vsts/some-long-project-name-reports g -a reports Now I have an alias 'reports' for that directory. What I want to do