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.
345 questions
Score of -1
0 answers
143 views
Granting batch script admin privilege independent of who calls it
I have a remote machine which executes a number of measurement tasks. Users are supposed to execute a startup via command line (login via SSH).
The machine has one non-admin user which is supposed to ...
Score of 2
0 answers
189 views
Drag and drop on Python script does not work, works on bat file
Trying to drag and drop onto a Python script does not work. Dragging over it does not show anything and ('consequently') dropping is not working.
Dropping a file on a bat file works. Also dragging ...
Score of 1
1 answer
228 views
How do I configure my batch files to remove Office365 and install Office 2024 LTSC?
I am trying to create a pair of group policies, one that removes Office365, and one that deploys Office2024 LTSC during startup. I have created XML files for each of these processes and tested them ...
Score of 2
1 answer
123 views
Batch sleep with interrupt?
I had a sleep loop at first that used timeout /t 300 but then I needed simple interop, like being able to restart the script without waiting ~2.5 minutes.
My only attempted solution is to run timeout /...
Score of 0
1 answer
361 views
Why I can do a wildcard copy from one location, but can't from another?
One wildcard batch copy works for me:
sudo cp /home/jenkins/dist/*.war /opt/tomcat/webapps/
but another similar doesn't:
sudo cp /opt/tomcat/webapps/*.war /home/jenkins/archive
cp: cannot stat '/opt/...
Score of 0
1 answer
404 views
How to create and manage a new DCOM object via batch or powershell
Win+R. dcomcnfg > I need to register a new dll using this tool as a COM. I can do this manually. But I have a lot of WS.
regsvr32 is not enough. The COM App need to exist in dcomcnfg
So, can it be ...
Score of 0
1 answer
578 views
Delete selected subkeys in a registry key
I need to Delete selected subkeys in a registry key.
For one of the subkeys I need to delete I tried:
(SET _KEY=SOFTWARE\Microsoft\Windows\CurrentVersion\UFH\SHC)
REG Delete "HKCU\%_KEY%" /V ...
Score of 1
0 answers
419 views
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 ...
Score of 0
1 answer
811 views
How can I redirect the output of one command in a batch file?
Edit: This question has been answered, please scroll down ⬇️
This question is related to Server Fault because I am automating minifying some web files before deploying them to my server.
So I have a ...
Score of -1
1 answer
6707 views
Using GPO to run batch files at logon not working
I'm having a weird issue with creating Group Policy on an inherited Domain Controller. This thing was never set up properly, and I'm not well versed in working with Group Policy.
We are running ...
Score of 1
0 answers
214 views
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 ...
Score of 0
1 answer
253 views
What is the best AWS infrastructure to run a migration of data from one SQL server to mongoDB?
I have some terabytes of data in our legacy system which runs SQL server. Our newer version runs on MongoDB. We are migrating this data to MongoDB. We have python scripts written and verfied, all data ...
Score of 1
1 answer
195 views
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 ...
Score of 0
1 answer
868 views
How to reset the "allow pc to be discoverable on this network" prompt?
I have been advised to ask this question here on ServerFault.
I've searched StackExchange, StackOverflow, and Google and I'm not finding any insights on how to reset the prompt when first connecting a ...
Score of 0
0 answers
69 views
at-command: Scheduling and process priority
I have about 10 "at" jobs. There are cases where there is a conflict of resources and I am trying to find a neat way to schedule this. Say, job#5 may want to start before the job#4 ends. ...