Solved

Creating a batch file?

Posted on 2002-05-20
4
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

630 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