Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've written some scripts and .bat files to configure XP machines and I have created a CD with all these scripts on and execute them through a single setup.bat file which is also on the CD.

One of these .bat files backups the Registry keys and it works fine if the .bat file is on the C: drive. However as soon as I try to execute it from the CD drive (D:) I get 'access denied.'

To get around this problem I wrote an additional script which copies the registry-backup .bat file to the C: drive and then executes it from the C: drive but I still get the same problem 'Access Denied'.

Am I correct in thinking this failure is some sort of security measure or is there a way around the problem? I do not want to resort to manually exporting registry keys as the CD is supposed to be an automatic configuration tool i.e. put the CD in and it's all done for me via scripts.

share|improve this question
Where does the batch file export the registry keys to? – joeqwerty Dec 28 '12 at 15:52
Just to a hidden directory on the C: drive. – Kerubu Dec 31 '12 at 12:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.