Questions tagged [batch-file]

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

batch files are text files containing commands executed in sequence to achieve a particular task or a set of tasks. They can be very simple, or can contain complex logic.

440 questions
0
votes
1 answer

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) will be propagated on the desktops of the users.The…
Darktux
  • 827
  • 5
  • 21
  • 36
0
votes
1 answer

Robocopy Copy "For Loop"

I'm trying to create a simple script that will robocopy several folders using the command below. When one folder is done copying, it moves on to the next. Does anyone have a batch/powershell for loop example for this? I've searched around but…
RomeNYRR
  • 1,441
  • 11
  • 16
0
votes
1 answer

How do you log the output of startup.bat from a GPO?

I'm trying to write some .bat files for GPO. I would like a way to see the output of the script to help debug problems. For the life of me I can't get it to log anything. I have tried the following... I created two batch files. The first had one…
Sam Sanders
  • 173
  • 4
  • 6
  • 18
0
votes
1 answer

Batch file installing executable only gives SYSTEM permissions

So, I have a couple of batch files that install some executables and they work, but when the executables setup shortcuts on the desktop only SYSTEM has access to them. Is there a way I can prevent that or make it so it adds Domain Users access or…
Gup3rSuR4c
  • 661
  • 3
  • 14
  • 29
0
votes
1 answer

Batch file to check version on mass computers

Please help me to create a batch file to run the below command (multiple computers) and the result to a text file. dtcheck "computername" /cmd="version"
Mathew
  • 1
0
votes
1 answer

How to know drive letter from a batch file is launched?

I would like to create a DOS/Windows batch file that copy files from a source to the letter drive from which this batch is launched. So, if i run the batch file from G:\ i would like it copy from the source to G:\MyDir. Elsewhere, if i run it from…
stighy
  • 931
  • 8
  • 21
  • 32
0
votes
1 answer

Amazon S3 - Automated Backup Using S3Sync, Windows Schedule & BAT file

I am trying to build an automated background backup program to backup my entire website and its heavy photo folders, using Amazon's cloud storage service, S3. I am using S3Sync from S3Tools and have successfully tested a dummy backup using only the…
PaparazzoKid
  • 332
  • 1
  • 3
  • 15
0
votes
2 answers

Script to delete Shortcut on each user's desktop

I'm looking for a script to remove a .lnk file that was placed on every user's desktop. I installed a program on a terminal server that put a .lnk file on every user's desktop, rather than putting one shortcut in the "Public" desktop folder. I have…
Jake A
  • 454
  • 2
  • 10
  • 22
0
votes
1 answer

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 matter what exit code you give it. For example, in a…
RCross
  • 469
  • 2
  • 6
  • 19
0
votes
1 answer

Run batch files as administrator user

I have a segment with 100 computers. I am booting each machne from WinPE OS located on a CD. After the OS has finished loading, I want to automatically run a batch file that will copy the CD to the C:\ drive. My questions: How can I edit the WinPe…
rrr
  • 3
  • 2
0
votes
3 answers

I Cannot create a .BAT file in the root of C "Access is Denied" Server 2k3

I have an oracle db server on a windows 2k3 box. I am currently unable to create or copy a batch file to the root of c. I can create batch files on different folders (i.e. in my user directory) or I can create .txt files in the root of C, but not…
SupremeDud
  • 103
  • 4
0
votes
1 answer

mkisofs - Floppy Image to Disk Image

I'm trying to compile MikeOS on windows. I've successfully (I think) created a floppy (.flp) image of the operating system. I want to convert it to a disk image (.iso) so I can run it in virtual box. I've tried mkisofs -quiet -V 'MIKEOS'…
CommunistPancake
  • 197
  • 1
  • 1
  • 6
0
votes
4 answers

Listing all current RDP sessions

We're running a certain application on a client's server. The app runs on the console session, and basically manages some batch processing. Every once in a while we discover the app is not running, and obviously this only happens after the client…
Eran
  • 267
  • 1
  • 6
  • 14
0
votes
3 answers

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" is there any way to just mark some scripts of the…
0
votes
3 answers

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 webserver (yes, this is stupid, but this is what they…
IssamTP
  • 175
  • 3
  • 12