0
votes
0answers
69 views

Batch script terminates too soon

I need some help with Windows batch/CMD scripting. I wrote a script to record mic-in to a MP3 for 12 hours. It runs ok when running it manually. It will run with task scheduler too - just that, ...
0
votes
4answers
2k views

Restart a Windows service from a script?

I know there are several similar posts on the subject, but what I would like to know is how to re-start a service that has already been stopped. Is there a .bat or .vbs script that would check if the ...
2
votes
1answer
472 views

Checking .BATs exit code with NAGIOS?

I currently have the following script on a Windows Server: @echo off set path=%PATH%;C:\UnxUtils\usr\local\wbin cd /D Z:\videos forfiles /M *_1.mkv /D +%date% > C:\mkv.txt >NUL 2>&1 ...
1
vote
1answer
2k views

Detecting a registry key with a space in the path from the CLI (or .bat file)?

I've run into a problem in which my experience (and Google-fu) have let me down. Basically, I need to push out KB968730 to a couple hundred clients or so. Naturally, would like to check for the ...
1
vote
1answer
281 views

What application is used to run cmd scripts?

I am creating an application whitelist in a local group policy and need to be able to run cmd script files. Simply adding cmd.exe, wscript.exe, or cscript.exe to the whitelist does not effect ...
0
votes
2answers
253 views

Add time to Windows script

I have this mini Windows Script which is execute every hour it basically create a file every hour but I need to rename the file using date (which is already done) but I am not able to add the time ...
1
vote
1answer
740 views

Delete all files' prefixes with windows cmd

I have a bunch of files with the same prefix "prefix_filename.txt". I want to remove this prefix and underscore from all filenames, how can I do this?
0
votes
2answers
1k views

Need relative paths from a batch script directory listing

I have a simple batch script that recursively looks at all files and folders within the directory and writes out the file inventory to a text file. It currently looks like this: dir /b/s > ...
76
votes
8answers
115k views

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I ...