Access is denied when running batch file on Windows7

Posted by Radek on Super User See other posts from Super User or by Radek
Published on 2012-10-11T02:13:19Z Indexed on 2012/10/11 3:40 UTC
Read the original article Hit count: 234

I have a bat file on Windows7 that I used to run. Now I am not able to run it because of Access is denied error. My account is part of administrator group.

C:\EduTester\others>mysqlbackup.bat
Access is

I am able to see the file via more mysqlbackup.bat when inside the directory where the file sits.

C:\EduTester\others>more mysqlbackup.bat
@echo off

rem settings etc etch

In fact I used to run the bat file as administrator using runas command

runas /savecred /user:yogurt\administrator "c:\EduTester\others\mysqlbackup.bat"
Attempting to start c:\EduTester\others\mysqlbackup.bat as user "yogurt\administrator" ...
RUNAS ERROR: Unable to run - c:\EduTester\others\mysqlbackup.bat
2: The system cannot find the file 

It used to run ok few days ago. I am not aware that I would change something that could affect this.

I have just tried to restart the Windows7 computer and I am experiencing the same.

UPDATE

In event viewer I can see this Windows cannot load the user's profile but has logged you on with the default profile for the system I think it might the be cause...

© Super User or respective owner

Related posts about windows-7

Related posts about permissions