Access is denied when running batch file on Windows7
- by Radek
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...