batch files are simple text files executed in a command to achieve a particular task or a set of tasks

learn more… | top users | synonyms

0
votes
0answers
16 views

Handle.exe creates Handle64.exe & hangs thereafter

On windows server 2008 R2 ,In a folder I have handle.exe along with psexec.exe and a batch file name test.bat with following content: psexec -s D:\data\handle.exe -p taskhost.exe > ...
1
vote
0answers
14 views

Losing stdout when process restarts itself in windows

I have for example a NodeJS process running with Nodemon, and all the output redirected to a file. nodemon example.app > 123.log When I change any file in the node app, the NodeJS process is ...
0
votes
1answer
16 views

How to catch system events when a program is being updated and robotize routine steps when you update software?

I'm a support engineer for an accounting program. The program runs under Windows. I have to update many of this accounting software bases daily. I mean the software is always the same. But users may ...
-1
votes
0answers
4 views

Automatically reboot Windows8 if no internet activity [migrated]

I have a media server located in a very inconvenient part of my house. Occasionally I will have to reset my router or it will reset itself. The issue is the PC loses connectivity for some reason, and ...
0
votes
1answer
111 views

Why is execution of batch files different between drag & drop and from command line?

Ok, so I've been trying to figure this out for hours with no progress. I have created a batch file to get details of a VHD. Everything runs fine and produces the expected results when run from the ...
0
votes
0answers
168 views

Install RSClientPrint for Reporting Services 2012 using .bat file and still be able to use 2005

I have a Reporting Services 2005 server that when users accessed it and tried to print reports would get a message asking them to install the print control, which they could not do because of lack of ...
0
votes
0answers
67 views

Error: “Parameter is incorrect” when opening 0b bat/cmd

Having sort of issue that is more likely annoying when need to create short batch script (though it's not scripting issue). I want to right-click on desktop and create new text file. Rename it and ...
1
vote
1answer
35 views

For in batch has weird behavior while reading folders

Im trying to do a simple batch (it is not the whole thing, but that's the part that is making everything fail) @echo off for /f "tokens=*" %%G in ('dir /s /b /a:d "e:\tmp\*"') do ( echo %%G ...
1
vote
1answer
89 views

Running multiple instances of a Batch file in windows simultaneously?

I have a windows batch file that is invoked by windows scheduler. When I try to have multiple windows scheduler tasks trying to run the batch file simultaneously, the batch file is locked by the first ...
2
votes
1answer
157 views

Creating a service to run RoboCopy

I'm attempting to put together a batch file that will set up a robocopy task as a service in response to user input. The basic idea being that the user will input MyRobocopyBatchFile.bat sourceFolder ...
1
vote
1answer
71 views

ftp batch file invalid login

I am trying to create a simple ftp batch file to upload a handful of files on a regular basis but I cannot seem to get the login right. I can take the same credentials and log in through Filezilla ...
1
vote
2answers
61 views

iis 7.5 Website permissions

I'm trying to setup permissions on IIS 7.5 running in Win7. The instructions I found are: Ensure all your sites have their own unique Application Pool assigned. In the Advanced Settings under ...
0
votes
1answer
38 views

Batch file output issue

I am trying to get a batch file to output some data to a CSV file. The command I have works perfectly in the command line but not when I copy it to a batch file. In the batch file, it just hangs and ...
-1
votes
2answers
82 views

Desktop backups maintenance on a network share

I have configured Windows Backup and Restore function on Windows 7 Professional desktops to make daily backup on a network share placed on a Windows Server 2012. (BTW It's a pity that this utility ...
3
votes
2answers
142 views

Stopping a scheduled task with WMIC

I need to find some method for disabling a scheduled task on a remote machine and waiting until that task has stopped executing if it happens to be running at the moment. I'd like to do this through ...
0
votes
1answer
129 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 ...
2
votes
1answer
98 views

PsExec hangs intermittently when calling AppCmd

We have an automated deployment process which is primarily managed by a batch file. One of the first steps in that process is to stop an IIS AppPool so the updated files can be safely copied. To do ...
0
votes
1answer
24 views

Tools or scripts to transfer files of a specific criteria to a USB drive

The company I work for has a 'company wide' share that is mapped on all of our machines. Over the years this has grown into the terrabytes and now lucky me has been tasked with bringing this back ...
0
votes
1answer
63 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 ...
2
votes
1answer
62 views

batch - File last modification time with seconds

I want to know when a file has been modified for the last time. I can get these infos using the following batch script: FOR %%i IN (myfile) DO SET modif_time=%%~ti The problem is that I need ...
4
votes
0answers
151 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 ...
0
votes
0answers
52 views

System 67 error scheduled task to transfer files

Running directly on command line the batch script works. But when scheduled to run (Windows 2003 R2 server) as the local administrator, I get the following error: D:\ScadaExport\exported>ping ...
1
vote
4answers
136 views

Prevent Accidental Execution of Windows .BAT File on Workstation?

I have a .BAT file with a robocopy line in it. The .BAT file resides on a network server directory. I use a client/monitor application on my workstation to send out a run command to several headless ...
0
votes
1answer
98 views

Batch script - How to release a locked file for batch 'copy'

A daily windows scheduled task triggers a batch script which moves program files to a folder on a server, using a simple copy routine. rem deploy programfiles copy dailybuild\*.dll ...
0
votes
0answers
66 views

“-STA -WindowStyle Hidden” Option not working with citrix

i have a powershell application published to citrix. It simple executes a remote batch file Initiator.Bat which then executes apowershell script with following command, Powershell ...
1
vote
1answer
90 views

install software with logon.bat script

On an SBS2011 server I can see in AD that users have logon.bat in the Log In Scripts field of their profiles, but when I search the hard drive of the server I can't find logon.bat. Firstly, I assume ...
2
votes
5answers
151 views

How would you run an application off a network share so you can update application?

We have an internal desktop application which we have deployed to a network share. In that directory are subdirectories for each version, ie, z:\Apps\ApplicationX\1.0 z:\Apps\ApplicationX\2.0 ...
0
votes
1answer
145 views

Windows Login straight to Terminal Server

Essentially I'm looking for some way via batch (or potentially powershell, but win XP machines so ideally batch) to open up a RDP connection to a LAN based Terminal Server upon a user logging into a ...
-1
votes
2answers
86 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 ...
0
votes
1answer
140 views

Port IE Bookmarks to Chrome [closed]

I want to be able to automate the transfer of existing Internet Explorer bookmarks to Google Chrome. We're rolling out Chrome to several users, but we want them to have their old bookmarks from IE ...
0
votes
2answers
48 views

assign batch jobs with one processor for each

I have four bat files and a four core machine. Is it possible to assign each run to each core i.e. 1 job for 1 core. Is there any way to control this with commands?
2
votes
1answer
64 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 ...
0
votes
1answer
261 views

Backing up database fully from remote server, and restoring to another remote server

I currently have three copies of my website (Live, Staging, and Development), with the database for each on three separate servers. More often not, a bug will appear that requires an up-to-date ...
0
votes
1answer
246 views

.bat file - Nagios v3.2 service check and start if stopped

I'm just barely getting into programming so I do apologize for my ignorance. I'm trying to create a .bat file that will check if a service is running on XP Pro. If service is running it will exit 0. ...
0
votes
2answers
136 views

Batch File to Loop Through Folders and Process If Specific File Found

I have a large number of websites running the same CMS that I want to update as a batch. As the update process just requires copying the updated files into the folder of the given sites, a batch ...
-2
votes
1answer
473 views

Script to copy down portions of a roaming profile [closed]

I'm currently working on migrating users to Windows 7 from XP. We use roaming profiles. Xp creates a folder named "Profile", while Windows creates "Profile.V2". Theses folders are independent of each ...
0
votes
1answer
995 views

How to escalate to administrative token in Windows 7 using only CMD.exe [duplicate]

If I am not able to right click on CMD and run as administrator, or CTRL + Shift + Enter to run CMD, but I am using an administrative user account in a non-admin shell (CMD.exe); How in the world do I ...
0
votes
2answers
3k views

How can I reset settings for Internet Explorer using a script?

I'm looking to reset Internet Explorer back to factory defaults using a batch file. I'd also like to delete: all Downloads, History, Cookies and Cache, plus anything else in a user's IE profile.
0
votes
1answer
275 views

Running scheduled task in current profile with another user

I have a doubt about Windows scheduler: I created a domain user (backupuser) appositely to launch a batch file that starts the backup. The problem is that the batch is launched in the "backupuser" ...
0
votes
0answers
45 views

Display only the last line of a windows command line executable

I'm trying to write a batch script that manages simple software deployments. One of the steps in the script compresses a file structure into a 7zip archive. During the compression process, the z7ip ...
0
votes
1answer
210 views

Record more events with procmon [closed]

'Process Monitor' has a max history depth of 199 million events. I need to record about 10 times this. I don't mind if the data is split, e.g. a new data set for every hour. Anyone know how to do it? ...
1
vote
2answers
2k views

Can't run batch files from server, Users do not have permission to access file

We're trying to run some logon / logoff scripts on server 2008r2 domain controller. The script is located in the default group policy logoff directory ...
0
votes
1answer
47 views

Enable Recovery console from a batch

I want to enable the Recovery Console on a lot of Windows 2003 servers. I want to automate this so I don't have to manually do it on hundreds of servers. The recovery console install process seems ...
0
votes
1answer
49 views

Netsh batch file

Is there way to join win7 to server 2008 by using netsh batch file ? I can change The IP , GateWay , Subnet Mask by bat file but How can I join domain
1
vote
0answers
858 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 ...
0
votes
1answer
112 views

Windows batch find folder if statement

Assume a file system with the following format Folder A --->Folder 1 --->Folder 2 --->Folder 3 etc.. Folder B --->Folder 4 --->Folder 2 --->Folder 3 Folder C --->Folder 1 --->Folder 2 --->Folder 3 ...
2
votes
1answer
603 views

Batch - how to copy file by minimum size and date modification?

I have this simple batch script which copies the newest file in some dir to another place. I want this script to also ignore all files (in the DIR command section) under 1GB of size. FOR /F ...
0
votes
1answer
198 views

Elevate batch file via UAC

I have found the following routine which is supposed to allow a batch file to issue a UAC prompt and elevate itself to admin. Problem is on Server 2012 it doesn't seem to work for me. According to ...
0
votes
1answer
155 views

Clearing temp files - Batch file pattern matching for *.tmp also includes *.tmpll

A file match for *.tmp also returns various *.tmpll files, is there anyway to restrict it to *.tmp files only? dir C:\*.tmp /s Also lists a load of *.tmpll files as well. Reason for doing this is ...
0
votes
1answer
117 views

How to create a shortcut to a file on Fileshare and hide the path from user

we are sharing a certain powershell script to our remote users; the powershell script wuill be hosted on the file share and the link(shortcut) to the bat file(which executed the powershell script) ...