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
1
vote
1 answer

Preforming an Administrative task, with a service account, via batch

Trying to install a piece of software from a network location, and everything works great except the software requires admin rights to install. Is there a way I can pre enter an admin service account that will allow this to install? Without the user…
level42
  • 199
  • 2
  • 11
1
vote
1 answer

Change Registry Value Command Line

Is there a way to set a registry value with a command line without using a .reg file to import it? I've looked over the reg and regedit.exe command line options, and it doesn't look like there's a way to do something like this... reg update…
Nixphoe
  • 4,584
  • 7
  • 34
  • 52
1
vote
1 answer

I'm trying to make a batch file that will ping multiple IP's and return the results in a text file

Possible Duplicate: Batch file to MASS ping group of computers on network by name, check reply, and resolve hostname I am trying to ping many IP's at once and to date it's been done manually. I would like to write a batch script that reads from a…
Dylan Cohen
  • 11
  • 1
  • 2
1
vote
1 answer

Why can't I get the `for` command work in my command line

This could also be read "Why can't I get the for command work in my batch file." When I try using the command: FOR /F "tokens=1-4 delims=/ " %%a in ('something cool') DO something else cool %%a %%b %%c It doesn't work! I'm getting: %%a was…
Nixphoe
  • 4,584
  • 7
  • 34
  • 52
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…
1
vote
2 answers

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 fine, except requires and initial click to allow…
1
vote
3 answers

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?
naspinski
  • 177
  • 1
  • 4
  • 10
1
vote
3 answers

"svn update" on a remote machine

I need an ability to run "svn update" on a remote machine for a non-technical user, how would I go about it? Our non-techincal users are using Windows XP and have Tortoise SVN client installed. I'm thinking to do following but I'm not really in a…
alexus
  • 13,112
  • 32
  • 117
  • 174
1
vote
4 answers

How can I find multiple values from windows command line output?

Example, to see if KB983590 is installed: systeminfo | find "KB983590" But what if I wanted to find out if more then one KB was installed?
MathewC
  • 6,957
  • 9
  • 39
  • 53
1
vote
0 answers

Why is my IF comparison op failing?

update SOLVED - the problem is not with my code. there is a design limitation (some might say "bug") in the command processor. the IF comparison operators do not work with values higher than 2147483648. tested and replicated on Windows 2000, XP,…
user75900
  • 11
  • 2
1
vote
4 answers

Autostart Cygwin on Windows boot and run a cygwin command

Sometimes my Windows server reboots at night to install new updates. Then the next day I find out that my cygwin instance has been stopped. What I want is on Windows start, also run Cygwin AND run a specific command. so, step 1: Right now I have a…
Peter
1
vote
1 answer

more than one start statment in the same batch file?

I wrote the following batch file: start D:\folder1\bin\run.bat start D:\folder2\bin\run.bat start D:\folder3\bin\run.bat start D:\folder4\bin\run.bat It executes the first start but then gives me the following error: windows cannot find "…
1
vote
2 answers

Running a batch file as a system service in Windows Server 2003

I currently have a batch file used to start a voice server application in C:\Teamspeak. The application cannot start directly because the batch file passes settings to the application. Is it possible to have this batch file start the voice server…
Kieran
  • 115
  • 1
  • 4
1
vote
3 answers

.bat files to find all files on drive bigger than X

So far I run a .bat file to find all the media files stored on our student shared drive, which then writes to a .txt file in my documents, for example: dir S:*.mp3 /s > "M:\logs\student\mp3.txt" This is probably not the best way of doing it and I…
tombull89
  • 2,964
  • 8
  • 41
  • 52
1
vote
4 answers

Batch file to change all network shares on computer

I need to change all shares of //foo to //bar in a batch file. Say i have R: //foo/foo and Z: //foo/bar I need to have a batch script that makes them R: //bar/foo and Z: //bar/bar Anyone have any idea how to do this? I'm thinking of looping…