Questions tagged [batch]

A batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter under MS-DOS and Microsoft Windows.

This was the first extension used by Microsoft for batch files. This extension runs with MS-DOS and all versions of Windows, under COMMAND.COM or cmd.exe, which execute its commands, normally line-by-line.

339 questions
2
votes
1 answer

Launch a batch script with path modification in EC2

I am quite new to AWS but I think I understood how to deploy an EC2 instance, what I am trying to do is install apache tomcat and all that is needed for this on a windows server 2016 using the user data field in the instance creation. My problem…
2
votes
0 answers

Automated Install of PADS (Mentor Graphics) works manually but not in Software Center

I am trying to automate the install of PADS VX.2 or PADS VX.2.2 (made by Mentor Graphics) to be ran with Software Center. It has a proprietary batch tool that I used to make a silent install script, and it runs fine when I call it through an admin…
2
votes
1 answer

Run a batch file from network shared folder depending on MS outlook bit version

Hello I'm trying to figure out on how to Run a file from network, basically it's located from \10.18.xx.xx\installers\install.bat, so yeah It's gonna prompt a username and password when I locate it manually. What are the codes the I should use in…
2
votes
0 answers

Behaviour of environment variables in HKCU\Volatile Environment reg key

I have a .bat script that runs for every user at login (copies Oracle Java Exception Sites). It copies a file to: %userprofile%\appdata\LocalLow\Sun\Java\Deployment\security\exception.sites Unfortunately, it works a little too well. Sometimes it…
2
votes
1 answer

Running bat file through powershell is not exiting in Jenkins

We are using Linux Jenkins server for our deployment in a Windows machine. We added this machine as a node and running deployment on it. We are using powershell for our deployment, everything is working but for a bat file that uses our application…
Geo
  • 575
  • 3
  • 9
  • 23
2
votes
2 answers

Robocopy - All data marked as modified

We make use of the following script to backup a folder (quite large - approx. 400GB), to a NAS with EXT4 Filesystem: robocopy "Source_Directory" "\\NAS\Destination\Directory" /MIR /FFT /COPYALL /W:5 /r:10 /log:"C:\RoboTest\robotest.log" Research…
joebegborg07
  • 869
  • 5
  • 16
  • 24
2
votes
1 answer

Calling a batch file using relative path

Oh gosh, gotta expose myself as a noob here ;) In Windows, I need to execute a batch file in a subdirectory of the working directory. However, just running subdir/foo.bat cmd1 cmd2 does not work, and I get an error saying The command "subdir"…
Franz
  • 135
  • 1
  • 1
  • 6
2
votes
1 answer

how to loop though sub folder to check if folder is empty - batch script?

What I want to do: write a batch script to do the following loop though all dir starting with "01-"... Check if "Pictures" folder is empty or not. skip rest folders If "Pictures" folder is Empty, than print path of empty "Pictures" folders. Output…
mark
  • 21
  • 2
2
votes
1 answer

how can I download web pages from the command line in windows

Well, I'm trying to do some automation using batch file to speed up my daily routine at work, and I need to solve these little questions: I want to install wget command, but using only the pure Windows Command Prompt I want to download some things…
DaMonki
  • 121
  • 6
2
votes
0 answers

DSADD in batch file - syntax incorrect! Same command in command works fine

Really stumped here and I'm sure the answer is simple. Simply put, I'm creating a bunch of AD accounts based on input from a spreadsheet. I've been able to concatenate the fields into a DSADD command that I run each time a new user is onboarded. For…
2
votes
3 answers

How to see what last batch was run on windows

Is there a way to see what was the last batch (something.bat) run on windows? I was in a folder which contains lots of batches, as I was opening them one by one by right clicking and selecting notepad++. I have a feeling that I could have clicked…
user288456
  • 21
  • 1
  • 2
2
votes
1 answer

Managing power options

For various reasons, we want our clients' computers to not sleep when on AC. We have been running the following script with moderate success: powercfg /change standby-timeout-ac 0 However, the script fails on a lot of computers (including computers…
MikeTG
  • 23
  • 1
  • 3
2
votes
1 answer

How to get value of environment variable from passed command line parameter

I have to use/reference an environment variable value which will be passed as a command line argument. Something like below set myvar=%1 echo Value of %myvar% is %%myvar%% Here in %%myvar%% I want to reference the value of that environment…
Tushar Joshi
  • 131
  • 5
2
votes
1 answer

Add new dependency to a Windows Service that already has dependencies

I want to add via Batch script a new service-dependency to an existing service with old dependencies, without deleting these dependencies. I know the command sc config ServiceA depend= ServiceB/ServiceC/ServiceD can add multiple dependencies, but I…
Reflection
  • 123
  • 1
  • 4
2
votes
1 answer

How to remove directories using wildcards by reading a file using batch?

Batch file for /f "delims=" %%f in (7profiledeletelist.txt) do rd /s /q…
serdar
  • 127
  • 7