Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating a batch file?

Posted on 2002-05-20
4
Medium Priority
?
177 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 300 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

688 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