Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
becka2kaii
- Posts: 6
- Joined: 26 Mar 2012 05:59
#1
Post
by becka2kaii » 02 Apr 2012 08:43
Hi I have created a batch file to format an RDX drive, which readsecho Y | format h: /q /x /fs:ntfs
exit If i manually run this batch file it works perfectly and does not eject the tape (which is what i want), however if i schedule it to run it runs and then ejects the tape
Any ideas how I can get this to run at a scheduled time and not eject the tape?
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#2
Post
by foxidrive » 02 Apr 2012 10:18
There is no difference between a scheduled task and a batch file running except the account it runs under.
Are you running it under your logged in credentials or the system account?
I wonder if the state of the unit matter here - if it is idle or asleep, vs being active...
-
becka2kaii
- Posts: 6
- Joined: 26 Mar 2012 05:59
#3
Post
by becka2kaii » 03 Apr 2012 07:50
we tested it whilst the machine wasnt in use but not asleep, whilst the machine was in use and when it was asleep. still did the same
I am trying to run it on a server using the administrator
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#4
Post
by foxidrive » 03 Apr 2012 08:06
The permissions change when it is running the batch file under the system account, via scheduled tasks.
I can't see any other reason for a change given the information you have provided.
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#5
Post
by foxidrive » 03 Apr 2012 08:10
To test this, schedule this batch file. When it runs then type in the name of the formatting batch file.
See if it ejects.
You may need to set the scheduled task to interact with the desktop to see the cmd prompt that will open.
Then try it again by running the cmd /k batch file from your admin account and repeat.