Questions tagged [batch-file]

batch files are simple text files executed in a command to achieve a particular task or a set of tasks

batch files are text files containing commands executed in sequence to achieve a particular task or a set of tasks. They can be very simple, or can contain complex logic.

440 questions
1
vote
4 answers

Setup.exe called from a batch file crashes with error 0x0000006

We're going to be installing some new software on pretty much all of our computers and I'm trying to setup a GPO to do it. We're running a Windows Server 2008 R2 domain controller and all of our machines are Windows 7. The GPO calls the following…
1
vote
1 answer

excecute batch command over MSI Package

I have a huge network of PCs that are all in a same domain (active directory). I want to enable WMI service and relative port, then set the domain's administrator credentials to WMI credentials over my entire network in the group policy. For the…
1
vote
0 answers

Mapping Drives for VPN using CMAK

I'm creating a connection file for VPN using microsoft CMAK. The VPN connection works but when I try to map drives it maps the drive under the Administrator account on the local machine because the VPN setup EXE needs elevated administrator account…
ssin
  • 53
  • 2
  • 5
1
vote
1 answer

batch file infinite loop when parsing file

EDIT: Apparently I don't have enough rep to answer my own question, so the answer is going here. OKAY! SO! I didn't exactly solve the problem... but I stopped using cacls.exe and started using icacls.exe and now it seems to work again. The batch…
1
vote
1 answer

Scheduled service/script/batch file to move files on condition of other files with similar filenames in same directory on windows

On Windows Server (Data Center? 2008?), i'm trying to set up a scheduled task that will: Within a particular directory For every file in it If there exists (in the same directory) 2 files with similar names (actually the same name with extra…
ilasno
  • 236
  • 1
  • 3
  • 16
1
vote
1 answer

How to set the Backup Identification Label of a job in NT backup using the command line

I'm using NTBackup on a server 2003 R2 system, to backup to a file over the network, using a batch script. What I'm trying to do is to change the name of the backup set as displayed in NTBackup's 'Restore and Manage Media' tab (highlighted below),…
Bryan
  • 7,628
  • 15
  • 69
  • 94
1
vote
2 answers

Nmap / Batch: alert if only ports usually closed are opened?

Context I check open ports on my server with a scheduled batch file: nmap.exe server1 server2 server3 etc >> log.txt Usually 21, 22, 80, 443 and 3389 are opened. Now I want to send an email if only other ports are opened. I saw there is Nmap Script…
GG.
  • 187
  • 1
  • 9
1
vote
1 answer

Win2008Server R2 - no window running .bat file via task scheduler

I'm running a couple of batch files via Task Scheduler that call rsync. The .bat files work great when run manually and appear to be running fine via TS as well. HOWEVER, it does NOT open a cmd window so I can visibly see the progress as it syncs…
1
vote
2 answers

How to enable logs for execution of multiple URLs through cscript.exe & *.vbs bat file

I have multiple URLs to execute. I am currently using below method I am creatving a vbs file with below content Option Explicit Dim objIEA Set objIEA = CreateObject("InternetExplorer.Application") objIEA.Navigate…
Kinnari
  • 11
  • 1
1
vote
1 answer

BAT/CMD to launch a exe multiple times with different parameters without extra bat files

Have a bat that calls a single exe for say 5-10 functions. Is there a way to make the executable run in multiple processes from a bat or cmd? for example: start cmd /k cd Program files\Prog\Happy happy.exe optimize 113 /nointerupt >NuL & …
mikedopp
  • 229
  • 2
  • 7
  • 16
1
vote
1 answer

script (search & delete temp files/folder) has got a failure

I use this script to clean history, cookies and cache(Temporary Internet Files) for all users AND it should also clean the temp dir BUT there seems to be something wrong. 2 things get mixed up I think, the %temp% variable (= D:\TEMP in my…
APOC
  • 21
  • 4
1
vote
2 answers

Batch file for checking port status of multiple IP Address

How to check the port status of multiple IP Addresses from windows command prompt. I am looking for some Batch file or a Dos SCRIPT. Can anyone help on this?
Sunil Reddy
  • 11
  • 1
  • 1
  • 2
1
vote
2 answers

Using the move command with /Y in a bat file

I need to move all folders in a directory called Profile.V2 out of the directory and then I want to delete the directory. I'm using a bat file to do this which is below, this works perfectly except when a folder with the same name already exists in…
Steve Lee
  • 11
  • 1
  • 1
  • 2
1
vote
4 answers

Batch file that spawns multiple Cmd prompt sessions running different applications

I am using a batch file to launch two different applications at the same time in different command line windows. Here is what I have: start cmd /k cd Windows\System32\ diskpart.exe >NUL & diskperf.exe >NUL & Repeat for every app you want to…
mikedopp
  • 229
  • 2
  • 7
  • 16
1
vote
2 answers

Server 2008 issue running batch file

For the life of me, I can't seem to get a batch file running in Server 2008 Task Scheduler, despite it not having the common problems I've seen before. Problem so far: I have a batch file that takes a hotcopy backup of some repositories and ZIPs…