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
3 answers

Send a batch file to a Windows machine, and execute it

I know PsExec is perfect for sending files over a computer on a network and then execute it on that remote computer, however I can't use PsExec because I'm developing a piece of software and I can't have PsExec as a dependency (for legal reasons…
Luca Matteis
  • 548
  • 4
  • 11
  • 21
1
vote
2 answers

batch script to retrieve zero byte files

How to retrieve zero byte files and copy into a folder using batch script. can someone help me out. i want the script should check the subfolders and displays the output as complete folder path in the output text file. Operating system is…
help
1
vote
1 answer

How to limit SMTP delivery to hourly batches

Moved over from StackOverflow. Sorry if you saw it there first In an effort to keep us from being labeled spammers by major ISPs (in addition to SPF records, privacy policies, CANSPAM compliance and the like) - I wanted to limit the amount of mail…
Jeremy W
  • 21
  • 2
1
vote
1 answer

Is there a way to create a custom installer package to do batch installs of a bunch of programs at once?

Basically I want to create a file which will automatically install a bunch of files without having to manually install each of them (i.e. Flash, Adobe Reader, MS Office, etc.). I'm guessing the easiest way to do this would be to create a batch file…
Windows Ninja
  • 2,586
  • 19
  • 46
  • 70
1
vote
0 answers

Syntax for creating SCHTASK.EXE tasks to run batch files that take parameters

I have a set of older batch files that scheduled the running of some maintenance tasks for a database that I look after. They used the AT command. The database has been moved to Windows server 2016 where the AT command has been deprecated. I want to…
1
vote
0 answers

Is it possible to open a file within a batch file as another user?

im trying to run psql.exe (postgreSQL) with an active code page set to 1252. I want to have a batch file that opens up a command prompt with that code page, then navigates to the psql directory to run it as "postgres" user. What I have is…
Vanillaice
  • 11
  • 1
1
vote
1 answer

weird behaviour in a Windows 2019 .BAT script

I have to restore a backup from a Linux MariaDB to a Windows MariaDB, where the PowerBI gateway will import its data. "mariabackup" is MariaDB's physical backup tool. But to restore it, the destination folder (%programfiles%\MariaDB 10.3\data\) must…
1
vote
0 answers

using start /wait for a headless process in a batch file - any way to show the process is running?

So I have a large batch file, and in the middle it hits a start /wait command to run a silent install of an MSI. I'd like to have some animation or something to indicate that the batch file is in fact doing something, as it can take some minutes. Is…
1
vote
0 answers

Capturing output of remote process from sysinternal's psexec Script

I'm trying to deploy a program throught PSexec with a script from Bat file to use one CMD instance per computer and not one after the other. I need a log to be generated on my local server to be sure that the the program succeded succesfully but the…
Mainacety
  • 11
  • 1
1
vote
3 answers

Can't remote reboot domain PC

I use bat + Powershell script to reboot a domain computer. I do not want to use domain admin but local user with admin privileges. bat file: PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList…
zuku
  • 61
  • 1
  • 7
1
vote
1 answer

language-neutral recursive takeown

In .bat files for Windows's cmd.exe, recursively taking ownership of a folder's content goes takeown /f foldername /r /d Y >nul: 2>&1 Problem is, it works only if in the current locale the word for Yes starts with the letter Y. E.g. it fails in…
fgrieu
  • 365
  • 4
  • 17
0
votes
0 answers

Required Microsoft RSAT dlls and exe files

I've got to script some Active Directory actions (remove computer object) but will be limited to using a batch file; I'm tied to a product that is looking for a specific batch file. I'll place my batch file on a Windows system; a service will call…
0
votes
1 answer

Using PsInfo with a Timeout Procedure (or piping through PsExec?)

We have a problem with people in our company leaving their computer running 24/7 even over weekends. Our corporate policy is to shut down when not in use but that doesn't always happen. So what we have been doing is running a simple script using…
ADY
  • 93
  • 1
  • 12
0
votes
1 answer

Plug-Start-Pull Windows batch script

I'd like to preface this by saying I'm not a system administrator at all, just a lowly Java programmer. However, I've been tasked with writing a batch script to be run on a sizable number of laptop computers. The script is done, but there's a catch…
iandisme
  • 103
  • 4
0
votes
1 answer

Create Widows Service from batch or exe file

I need to distribute some app to all our stations without users having the ability to close the app. The app jumps on users' screen and notifies them to restart the computer, and I don't want users to be able to close this app through task…
Haim Ben
  • 1
  • 1