I use a dell RD1000-160GB backup drive on my network. The computer that this drive runs off of is a windows XP machine. After doing some research, I still find myself stumped on even whether or not it is possible to do what needs to be done (well doing it the way I am thinking of anyways). So here is my problem.

I have written a batch file (gbackup.bat) that simply does a quick format followed by a low-level format on the G drive (RD1000 backup drive). Every day, my company runs a backup, which is automated at about 11pm at night. In order for this backup to work correctly (for whatever reason), we need to run the batch file first. I would like to make it so that if you insert the new disk into the backup drive it will prompt the user (using Auto-play) with the option of running the batch file to do the formats. Everything I have read has pointed me in the direction of using an autorun.inf file. However, nothing talks about anything other than CD/DVD (and occasionally USB thumb drives). When I tried to write my own autorun.inf file, it is being completely ignored by windows. All-in-all, it boils down to a few questions.

1. Can you use an autorun.inf file on a backup drive?
2. If not, how would you automate a task such as this to run my batch file at a given time every day (this XP machine is hooked up to a windows server 2003 system)?
3. If so, where could I go to learn about how to do this specifically for a non-cd/dvd/usb thumb drive?

Posts on this topic are much appreciated and I thank you all ahead of time!

Dani AI

Generated

Short answer: Autorun.inf is not a reliable way to trigger a format on that RD1000 setup — the mechanism is intended for optical media and modern Windows restricts AutoRun for non‑CD/DVD devices — so the Scheduled Tasks approach that suggested is the robust, supported solution for an XP host. (learn.microsoft.com)

Practical steps (higher‑reliability):

  • Use the Scheduled Tasks UI on the XP box (Add Scheduled Task) or the command line schtasks to run the existing gbackup.bat at a fixed time before the nightly backup. Provide an account with the required privileges and a nonblank password so the task can run unattended. (learn.microsoft.com)

Example command (replace placeholders and avoid keeping plaintext passwords where possible):

schtasks /create /tn "GBackupFormat" /tr "C:\Scripts\gbackup.bat" /sc daily /st 22:50 /ru "DOMAIN\BackupUser" /rp "<password>"

Note: schtasks will prompt for/require credentials and the task will run in the security context used when created — use a dedicated service account with least privilege. (learn.microsoft.com)

Safety checklist to add to gbackup.bat (prevent accidental format): verify the drive label and require an explicit typed confirmation before issuing destructive commands. Example snippet:

@echo off
set TARGET=G:
vol %TARGET% | findstr /i "BackupDisk" >nul || (echo Label mismatch - abort & exit /b 1)
set /p CONFIRM="Type FORMAT to proceed: "
if /i not "%CONFIRM%"=="FORMAT" exit /b 1
rem -- proceed with format commands --

If AutoRun must still be investigated, note that XP supports AutoPlay/AutoRun only under specific driver/device conditions and that registering an Autoplay handler (device arrival) is an advanced route — but it is fragile and discouraged for this use; Scheduled Tasks or a small service/monitor is safer. (learn.microsoft.com)

Recommended Answers

All 2 Replies

If your batch file works, use the Scheduled Tasks>Add a Task wizard to setup a time for it to run.

Thank you much! That was a very simple, and efficient way to do exactly what I needed done.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.