Solved

Creating a batch file?

Posted on 2002-05-20
4
174 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

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…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 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