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

learn more… | top users | synonyms

0
votes
2answers
433 views

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 ...
0
votes
1answer
673 views

Run batch files as administrator user

I have a segment with 100 computers. I am booting each machne from WinPE OS located on a CD. After the OS has finished loading, I want to automatically run a batch file that will copy the CD to the ...
1
vote
1answer
1k views

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 ...
1
vote
1answer
14k views

Script to delete temp files for all users in XP, Vista, and 7

Basically, we have numerous customers running XP and 7 with a few Vista machines. I've found this batch script, but it is limited to the current user (uses the %userprofile% environment variable). ...
6
votes
2answers
3k views

Mass delete mapped & local printers

Is there any way to mass remove all local and network mapped printers from all workstations on a domain via group policy or a batch file? I need to remove local Windows 7 printers such as Fax, ...
1
vote
2answers
173 views

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") ...
0
votes
1answer
663 views

Why does BitsAdmin.exe not finish a download and leaves just a tmp file?

Still learning how to use BitsAdmin.exe in batch files. Here is my script, which fails to finish downloading a file, and leaves just a temp file called "BIT851.tmp" on my desktop. Any idea what I am ...
0
votes
2answers
777 views

I Cannot create a .BAT file in the root of C “Access is Denied” Server 2k3

I have an oracle db server on a windows 2k3 box. I am currently unable to create or copy a batch file to the root of c. I can create batch files on different folders (i.e. in my user directory) or I ...
3
votes
2answers
1k views

What rights does an account require to log on as a batch job?

I've got a Windows batch script which I'm trying to get Veritas Cluster Server to control using the process agent. The batch script needs to run as a particular user, but when I try to online the ...
0
votes
1answer
403 views

mkisofs - Floppy Image to Disk Image

I'm trying to compile MikeOS on windows. I've successfully (I think) created a floppy (.flp) image of the operating system. I want to convert it to a disk image (.iso) so I can run it in virtual box. ...
2
votes
2answers
1k views

How to execute a batch file each time a user logins?

I've written a batch script which copies of some files in the CommonAppData folder (C:\ProgramData) to the logged in User's Local AppData. What I would like to do is to execute this script for every ...
1
vote
1answer
2k views

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 ...
2
votes
3answers
467 views

I need to clear out the same directory on multiple servers across a network. How do I do this?

On multiple (about 20) servers, there exists the same directory C:\Deployments. This directory has multiple subfolders which contain more subfolders and files. The C:\Deployments directory itself ...
0
votes
3answers
756 views

Batch file and other scripts on windows 2008 r2

is thee a way to make a all the scripts in a specific folder running without the need of the UAC prompt? or maybe using power-shell to run the scripts without using "Set-ExecutionPolicy Unrestricted" ...
2
votes
2answers
2k views

find file newer than yesterday using batch script

I am trying to write a batch script that can find the files created/modified/newer since yesterday and/or any specific day from today in a particular folder. Then those files need to be copied to ...
0
votes
3answers
4k views

how to get default gateway of certain adapter in windows bat?

Please see below ipconfig output in windows. C:>ipconfig Windows IP Configuration Ethernet adapter Local Area Connection 11: Connection-specific DNS Suffix . : Link-local IPv6 Address . ...
-3
votes
2answers
252 views

How to sync windows server folders with a AIX server using script?

Everyday I would like to sync the files and folders in the windows server with AIX server and vice versa. Does anyone suggest me, How I can write a shell or bat script to achieve this?
0
votes
3answers
324 views

Windows Server 2008 R2 Scheduled Operations

Goodmorning everyone, I'm a newbie Windows 2008 s.a., and I'm stuck with a strange problem. I've made a very simple bat file that stops the Apache HTTP Server, copies a file and then restart the ...
0
votes
2answers
159 views

auto set permission on any file copied into folder

I have a batch file that copies folder from a temp directory to a public internet directory. The problem is, once the file is copied, the IUSR account doesn't have read privileges to the file and I ...
2
votes
1answer
377 views

batch file to dump data from database and dynamically name the file name

I have a batch process that dumps data from my database (windows 2008 r2) and I'd like to dynamically name my file with the day of the week included. is that possible to do with a simple .bat file? ...
4
votes
1answer
5k views

How to delete scheduled task from command line without confirmation? (schtasks delete)

I can create a task from command line like this: schtasks /create /tn SomeTask /tr "do.bat arg1 arg2" /sc ONCE /st 00:00:00 /sd 01/01/1991 and now I need to delete it. However the command needs to ...
2
votes
2answers
6k views

Passing CMD via PSEXEC to a remote computer via .BAT file

Using PSEXEC to call CMD for a DEL command on a remote computer through a batch script. PSEXEC \\hostname -u username -p password CMD /C DEL /Q /F C:\Folder\File.txt The script pauses with a new ...
2
votes
1answer
261 views

Enterprise Version Inventory for Adobe Reader 7,8,9,10

Is there a tool or method to build an inventory of the version of Adobe Reader installed on computers in a domain? This would allow specific targeting of Adobe Reader updates to the computers who ...
3
votes
2answers
7k views

Can I change Internet Explorer security settings using a script?

Is it possible to change Internet Explorer security settings using a .bat or .vbs file? Basically, I need to change IE7 and IE8 security settings for the local intranet. The settings I want to ...
1
vote
1answer
264 views

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 ...
0
votes
2answers
4k views

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?
2
votes
1answer
315 views

Windows batch file executes some commands that return output over and over

I tried to put commands that return output into batch file. When I run the batch file it executes the command over and over until I cancel with CTRL+C. I observed this behavior in Windows CE, Windows ...
0
votes
2answers
541 views

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 ...
10
votes
6answers
417 views

50 workstations, 1 .bat file on a network server, will it work?

I have a .bat file to perform maintenance on machines. I put the .bat file on a network attached server for all workstations to access it. If I were to use the windows scheduler to make that .bat ...
0
votes
4answers
2k views

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 & ...
0
votes
2answers
716 views

Robocopy website deployment script log file name truncated in AM

This is an IIS website deployment script I started to write. It moves files from directory A to directory B and creates a log file with the date/time as the file name. When it's run in the AM hours, ...
0
votes
1answer
969 views

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 ...
1
vote
1answer
248 views

How to find out what is wrong with a Scheduled Task when it doesn't error

I have a number of batch files, which all work when ran separably to back up various Postgres dbs across the network. However when ran through task scheduler the backup files aren't created. There are ...
0
votes
2answers
2k views

How to schedule batch file to run on the desktop in win 2008 R2

I have some backup batch file scripts which I was running in xp and I have migrated to windoes server 2008 R2 where it's not running in front when scheduled with task manager. I struggled a lot to ...
1
vote
1answer
795 views

command line REGEDIT command (edit) without a popup

I am attempting to disable UAC via a batch file with a REGEDIT command, and everything works - but, I need to be able to do this without clicking. When I run the: REGEDIT /S somefile.reg It works ...
1
vote
3answers
135 views

Running a batch file as an admin

Is it possible to run a batch script as an administer? We need this to be done without any user interaction, so there can't be any password prompt or UAC popups - is this possible?
1
vote
2answers
4k views

mysqlcheck doesn't support multiple contradicting commands

Any idea why I am seeing this error message? This script works fine on a ever so slightly older version of MySQL running on a different server with a similar config. :: check/analyze/repair/optimize ...
1
vote
0answers
670 views

Trying to install PEAR (running go-pear batch file) - getting “php_pdo.dll is missing” error

I need PEAR installed. So, I tried running the go-pear batch file inside by PHP extract. But it gives this error - The program can't start because php_pdo.dll is missing from your computer. Try ...
1
vote
2answers
938 views

slmgr.vbs supress dialog

We use a batch file with the following content to activate our windows domain computer after imaging: slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX slmgr -ato This works well, but there is a ...
1
vote
1answer
2k views

Executing Windows administrative shell commands on Windows using Python

I have a batch script using Windows shell commands to perform several administrative actions. The script is running great on Windows 7 but when i try launching it from Python 2.6 nothing happens: ...
2
votes
3answers
10k views

Batch script to download many files via http?

I have a list of urls (over 100) of patch files from various sources that I need to download. I need to create a batch script that will download these files and dump them all into the same ...
0
votes
2answers
423 views

batch file to strip numbers from filename and pad to two digits

I have a text file with a list of server names (servers.txt) that looks something like this: server1 server2 server3 I have a feeling this can be done with the FOR command as I use that to perform ...
2
votes
3answers
2k views

keep command window open after running bat file

i have a bat file that has the following it: sm start "Schedule" this code runs but the command window closes immediately what can i put inside the bat file to keep the window open?
2
votes
4answers
253 views

possible efficient ways of transferring files from one server to another

what are the possible good and efficient ways of transferring files from one server to another? In this case it will be from windows server 2003 to windows server 2008 r2. I am thinking Powershell ...
2
votes
4answers
6k views

Remote installing programs by scripts or batch files

Firstly, I can't use Group Policy as our team doesn't manage that. The company is a massive FTSE company with a team for every aspect of IT you can think of. Our team needs a way of installing ...
0
votes
3answers
224 views

Batch file function

I need to create a batch file that will purge data from an existing file. Basically SQL server management studios does not overwrite backup data; therefore after the backups have been run and the data ...
1
vote
2answers
75 views

Batch file problems

I have created a batch file to copy and zip up an entire drive of data on my server. I have selected the D:\ drive to be copied and zipped. However, I have one problem. When I run the batch file, only ...
0
votes
1answer
185 views

Batch Script - Query Filenames From Server Printer

Client: Windows XP Print Server: Ubuntu via CUPS Is there a way to query the printer queue on the server from a client to retrieve the name of the file being printed? Code example would be ...
0
votes
1answer
132 views

Errors running Batch files

I have recently constructed a batch file on my server to zip up data and send it to a backup source for archiving. However when I run the batch file I get the following error... '7z.exe' is not ...
1
vote
0answers
325 views

How do i create a bat file to create user directory with proper rights and a script to reset it if something goes wrong

I need to create user and directories for the user and share it. The rights are set on NTFS structure only. The user must do all except change rights and take ownership this is not allowed and this ...