I am trying to create a DOS command line (batch) file to start and stop the Acronis Scheduler2 Service.
I have written
echo off
net stop "Acronis Scheduler2"
pause
net start "Acronis Scheduler2"
pause
exit
the pause in Blue is for testing and will be deleted
When i run the file I get the message that NET is not recognised as an internal or external command
The original start line is
"C:\Program Files\Common Files\Acronis\Schedule2\schedul2.exe"
Where am I missing the plot?
Should the "Acronis Scheduler2" be replaced with schedul2
syntax for dos command
-
- GoldLounger
- Posts: 3081
- Joined: 24 Jan 2010, 19:07
Re: syntax for dos command
If you start the service via the Services snap-in, i.e. via Admin tools in the Control Panel etc. or by running services.msc (Start > Run), and then check with the net command for services running at the moment: net start; can you see the name used in that list? Perhaps if you try with that name you can then run it in your batch file. I don't have the software so I can't check, sorry.
Byelingual When you speak two languages but start losing vocabulary in both of them.
-
- Administrator
- Posts: 7220
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: syntax for dos command
According to this post at Downloads-closing processes - Tech Support Guy Forums - I think the line you want is:
NET STOP "Acronis Scheduler2 Service"
NET STOP "Acronis Scheduler2 Service"
Leif
-
- PlatinumLounger
- Posts: 5427
- Joined: 24 Jan 2010, 08:33
- Location: A cathedral city in England
Re: syntax for dos command
If you do sc query > $.txt & notepad $.txt you will get both the Service Name and the Display Name of all services.
You can choose either the appropriate Service Name or the Display Name as the target of a NET STOP or a NET START, with the usual "put the name in double quotes if it contains a blank" proviso.
You can choose either the appropriate Service Name or the Display Name as the target of a NET STOP or a NET START, with the usual "put the name in double quotes if it contains a blank" proviso.
John Gray
If you are having problems with solitude, you are not alone.
If you are having problems with solitude, you are not alone.
-
- 2StarLounger
- Posts: 117
- Joined: 01 Apr 2010, 01:55
Re: syntax for dos command
Hi John Gray,
I did what you suggested and received this (extracted) from the notepad file created
SERVICE_NAME: afcdpsrv
DISPLAY_NAME: Acronis Nonstop Backup Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
Please tell me what next
I am still worried about getting the message that
NET is not recognised as an internal or external command
That is in the cmd window
I did what you suggested and received this (extracted) from the notepad file created
SERVICE_NAME: afcdpsrv
DISPLAY_NAME: Acronis Nonstop Backup Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
Please tell me what next
I am still worried about getting the message that
NET is not recognised as an internal or external command
That is in the cmd window
-
- 3StarLounger
- Posts: 227
- Joined: 08 Feb 2010, 22:27
- Location: Mid-Cheshire, UK
Re: syntax for dos command
NET is not recognised as an internal or external command
As NET is not a complete command perhaps the following will help:
C:\Users\>net /?
The syntax of this command is:
NET
[ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
STATISTICS | STOP | TIME | USE | USER | VIEW ]
C:\Users\[User Name]>
As NET is not a complete command perhaps the following will help:
C:\Users\>net /?
The syntax of this command is:
NET
[ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
STATISTICS | STOP | TIME | USE | USER | VIEW ]
C:\Users\[User Name]>
-
- 2StarLounger
- Posts: 117
- Joined: 01 Apr 2010, 01:55
Re: syntax for dos command
That is the worry, and this problem could be compounding my issue with Acronis.
See the bottom Window capture, it is the result of C:\Users\>net /?
Other DOS commands are there, if I do C:\Users\[User Name]>dir /? I get the full syntax
There is a file net.exe see the top attachment.
Is it an internal or external command?
See the bottom Window capture, it is the result of C:\Users\>net /?
Other DOS commands are there, if I do C:\Users\[User Name]>dir /? I get the full syntax
There is a file net.exe see the top attachment.
Is it an internal or external command?
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78665
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: syntax for dos command
The version in C:\Windows\$NtServicePackUninstall$ is not the one you'd run. You should look for Net.exe in C:\Windows\System32.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 117
- Joined: 01 Apr 2010, 01:55
Re: syntax for dos command
There is a second Net command, I attach another capture, the dates are confusing in that it was created after it was modified
You do not have the required permissions to view the files attached to this post.
-
- GoldLounger
- Posts: 3081
- Joined: 24 Jan 2010, 19:07
Re: syntax for dos command
E_OGRADY wrote:That is the worry, and this problem could be compounding my issue with Acronis.
See the bottom Window capture, it is the result of C:\Users\>net /?
<snip>
You should have net.exe in %SystemRoot%\system32 (usually C:\Windows\system32) and %SystemRoot%\system32\dllcache (On a Windows XP SP3 system it's a SP2 version (5.1.2600.5512) and date.) You can enter %SystemRoot%\system32 in the Start Run box to move there directly.
If you can find the file in the above folder(s), what is your path? Type set at the command prompt; does it (the PATH variable) include C:\Windows\system32?
(And, in this case, you should get the short syntax help when typing only net, just as typing net /?.)
Byelingual When you speak two languages but start losing vocabulary in both of them.
-
- Administrator
- Posts: 78665
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: syntax for dos command
Is your system clock set correctly? As far as can tell, 10 March 2011 11:28:23 AM will be later today!
There should have been an instance of net.exe in C:\Windows\System32. You could try copying the instance from C:\Windows\System32\DLLCache to C:\Windows\System32.
Or perhaps you need a system file check (sfc /scannow) but I'll leave that for the Windows experts.
There should have been an instance of net.exe in C:\Windows\System32. You could try copying the instance from C:\Windows\System32\DLLCache to C:\Windows\System32.
Or perhaps you need a system file check (sfc /scannow) but I'll leave that for the Windows experts.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 117
- Joined: 01 Apr 2010, 01:55
Re: syntax for dos command
Hi first thing that is good in the past week,
I have extracted net.exe from my system and copied it to the C:\windows\system32 folder.
Now I get the syntax from the net /? command
Now to figure out the batch file.
Of interest I went back to my backup of this system dated 23/05/2008 and net.exe was not in that backup
Yes HansV my clock is set correctly, I am from Australia, very early in the time zone, unfortunately the early bird does not get the worm.
I have had a lot of instances where (do not want to name) instances where security software deletes files at will
I have copied and renamed net.exe to observe.
I have extracted net.exe from my system and copied it to the C:\windows\system32 folder.
Now I get the syntax from the net /? command
Now to figure out the batch file.
Of interest I went back to my backup of this system dated 23/05/2008 and net.exe was not in that backup
Yes HansV my clock is set correctly, I am from Australia, very early in the time zone, unfortunately the early bird does not get the worm.
I have had a lot of instances where (do not want to name) instances where security software deletes files at will
I have copied and renamed net.exe to observe.
-
- 2StarLounger
- Posts: 117
- Joined: 01 Apr 2010, 01:55
Re: syntax for dos command
The final batch file is
@echo off
net stop "Acronis Scheduler2 Service"
net start "Acronis Scheduler2 Service"
exit
And now gives me a very easy, and successful workaround to my Acronis problem.
Now maybe I can back to my network problem, I decided that before playing around with the network problem I would do a complete backup, that created this problem.
Without a doubt this is the best forum anywhere and I thank all for their input.
@echo off
net stop "Acronis Scheduler2 Service"
net start "Acronis Scheduler2 Service"
exit
And now gives me a very easy, and successful workaround to my Acronis problem.
Now maybe I can back to my network problem, I decided that before playing around with the network problem I would do a complete backup, that created this problem.
Without a doubt this is the best forum anywhere and I thank all for their input.