Solved

Creating a batch file?

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
Cannot connect to share on new Win8 PC 3 968
windows 2000 3 435
Kill system process in windows 2000 10 205
Old Schema existing from Windows 2000 DC that is no longer available 14 137
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 shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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