Solved

Creating a batch file?

Posted on 2002-05-20
4
167 Views
Last Modified: 2010-04-13
Hello,

I installed a product called DocuShare on my Windows 2000 server. For the backup its process, it requires the following commands to be entered in the command line interface (cmd.exe)

dsconfig read_only 1
dsservice stop DSMonitorSvc

The 1st line sets the application to read only mode, the 2nd line stops the background processes. All of this will enable a safe backup of the application's data. Using the commands within the 'command line interface' works fine.

My problem starts when I try to automate this process as a batch file, so all of this can be done at 01:00. I've created a .bat file within text editor called Textpad with the following content:

dsconfig read_only 1
dsservice stop DSMonitorSvc

I copied it to the Win2K's desktop and 'click' on the file, and it doesn't work.

What I'm I doing wrong here? I've even saved the same file as a .cmd, and it gave the same result.

Kind regards
Kyn

0
Comment
Question by:kwaichung
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
SteveGTR earned 100 total points
ID: 7021336
Create a shortcut like this:

command.com /c your_batchfile_name

That should do the trick. You can also set the initial directory if you need to.

Good Luck,
Steve
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 7021519
You may also need to change the user account if this is scheduled.

Also the /k command will make it run interactively.

I hope this helps !
0
 

Expert Comment

by:uffepuff
ID: 7023894
I think you have to use quotationmarks (") around the parameters, like:

dsconfig "read_only 1"
dsservice "stop DSMonitorSvc"

0
 

Expert Comment

by:uffepuff
ID: 7023899
Or it might be that you have to enclose the entire phrase, like:

"dsconfig read_only 1"
"dsservice stop DSMonitorSvc"

Don't remember which one. =)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now