0
votes
1answer
88 views

Batch script works on Windows 7 but not Windows Server 2008

Good Day Al I have the following batch script that loops through a folder containing .sql files. When it finds a .sql file that has today's date timestamp on it, it copies that file to a new ...
0
votes
1answer
41 views

Query in dsrm command

I need to remove 1000 computers from AD. I tried the script below, but it's not working. When I used dsmod to disable computers, in the same script, it works. @echo off set ...
3
votes
0answers
110 views

Windows Task Scheduler cannot access EFS encrypted folder despite running as a user with access

I have a batch file set to run via Task Scheduler in Windows Server 2008 R2. The batch file is being used to rotate and compress MySQL logs, and the folder containing these logs is encrypted using ...
-1
votes
2answers
76 views

Command only working when put directly in command prompt, not in batch file

On my SBS 2011 I have a batch file called wakeup-nas.bat, with the following contents: wol.exe 5475e0d59ffa wol.exe is an executable for sending wake on lan packets. It is in the same directory as ...
2
votes
1answer
56 views

Test Multiple Server for login (WIndows 2008)

I currently run a PING sanity check test (batch file with result file) on over 80 servers in 4 environment. But, even if we "ping" ok 100% of the servers, it doesn't mean that the machine are working ...
1
vote
0answers
673 views

Is MSIZAP still useful, or is it obsolete?

I update flash using MSI files installed by group policy. However, with every update, about a third of the workstations fail to update (Windows Vista and Windows 7 32/64-bit editions). In the event ...
1
vote
1answer
378 views

Pentaho Windows Batch file not running when executed on Windows Server 2008

I'm running a Pentaho Kettle Kitchen batch scripts on Windows Server 2008. When I launch the batch file, the Windows Command prompt pops up and then disappears. I've changed all files in the folders ...
2
votes
1answer
139 views

Running a batch script as network services on windows

On linux I know you can run files under different users pretty easily but on Windows how do you do it? Do I have to log in under that user? Can I run it with the schedule system? I need to be able to ...
1
vote
1answer
770 views

batch file infinite loop when parsing file

EDIT: Apparently I don't have enough rep to answer my own question, so the answer is going here. OKAY! SO! I didn't exactly solve the problem... but I stopped using cacls.exe and started using ...
1
vote
1answer
317 views

Scheduled service/script/batch file to move files on condition of other files with similar filenames in same directory on windows

On Windows Server (Data Center? 2008?), i'm trying to set up a scheduled task that will: Within a particular directory For every file in it If there exists (in the same directory) 2 files with ...
0
votes
1answer
2k views

ERRORLEVEL built-in no longer works on Windows Server 2008

Using a couple of servers at work running Windows Server 2008 and noticed that my batch scripts are no longer failing gracefully. Put simply, any statement checking ERRORLEVEL seems to pass, no ...
1
vote
1answer
670 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 ...
0
votes
3answers
610 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" ...
0
votes
3answers
316 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
153 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 ...
0
votes
1answer
488 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
199 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 ...
1
vote
3answers
725 views

Shortcut to open IIS 7 Manager so it Shows “Sites” view (status) by Default?

I would like to quickly be able to check whether a site is online after logging into the desktop of Windows Server 2008 R2 (x64). I would prefer to be able to do this in just 1 single or double-click ...
0
votes
1answer
473 views

Gracefully Terminate Console App Run Via Task Scheduler

I'm running a console application on Windows Server 2008. I want it to always run, so I have scheduled it to run at startup via the Task Scheduler. I set up the task so it does not require a login. ...
1
vote
3answers
876 views

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

Making sure a batch is run with admin privileges

We use batch files to do simple installations of COM servers - mainly a few file copies and regsvr32s. Since regsvr32 writes to the registry's local machine hive, the batch must be run with ...
1
vote
1answer
395 views

Batch File to delete contents of folder not modified in the last 3 days?

Anyone know of a script which I can execute with task scheduler which will allow me to delete the contents of a specified folder, but only the content that hasn't been modified for the last 3 days?
1
vote
1answer
271 views

Why does appcmd.exe behave differently when executed inside a batch file?

I have the following appcmd to add an exception to IIS7's ISAPI and CGI restrictions. The exception I am adding should look like: c:\perl\bin\perl.exe "%s" %s Here is the command line: appcmd set ...
1
vote
1answer
111 views

Delete windows profiles with similar names using a batch file or script

I’m on a Windows 2008 server and would like to delete 15 users (user1 till user15) without having to do this by hand. After deleting them completely I’d like to readd them (again, with a script) and ...
3
votes
1answer
2k views

Windows Server 2008 - Windows Server Backup - Email Alerts

I would like to create a script that emails me when a scheduled daily backup runs. I'd prefer the email to indicate success or failure. I understand that this is not an easy thing to do with Windows ...
4
votes
2answers
1k views

Windows Server 2008 - Calling FTP from .CMD - Pass a parameter to an FTP file?

I am calling the following from a .cmd file: ftp -d -s:D:\backup\web-daily.txt The web-daily.txt file is an ftp input file with similar contents to this: open <server> <login> ...
3
votes
3answers
5k views

Windows Server 2008 CMD Task Schedule not running

I have a BAT/CMD file that when run from the command prompt runs completely. When I run it through the Task Scheduler it partially runs. Here is a copy of the file cd\sqlbackup ren Apps_Backup*.* ...
1
vote
2answers
2k views

Does anyone have a Windows “at /every:” example to explain how to setup a batch file to run every day?

Microsoft documentation for the "AT" scheduler command shows that it has an /every: switch to schedule a script to reoccur on specified days. I've done it before, but I can't remember the syntax for ...
2
votes
4answers
11k views

run bat file at startup

How do I run a bat file at startup in Windows 2008?
9
votes
8answers
77k views

How to create a service running a .bat file on Windows 2008 Server?

I've created the service using sc create myService binpath=myservice.bat But when I start it, it fails with the following error message: [SC] StartService FAILED 1053: The service did not ...