This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Access Denied Error

So, i am doing a project on 8051 core. I would like a output to be a .bin format than .hex. So, i use hex2bin.exe for that purpose. It is easy to create a batch file and execute it from User commands in Options For Target.
But the trick is that i have 12 different projects. So i want to make 12 different binaries. Now i make a batch file which would take input from user and based on that input, that particular section of batch file is called and binary file is made successfully.
But the problem is that i keep getting following error:

Error: Access is Denied

whenever i run batch file from Run Commands in Options for Target.
But it runs fine when i run it simply double clicking.

Can someone plz help me figure this problem out.

Parents
  • We do know (or do we?) that the tool can start the batch file. Because the OP have acknowledged (or have he?) that the current working directory when the script is started is the correct one.

    The next thing is that any commands run by the script must either be in the path - or have a full path given.

    And basic batch-file knowledge would be enough to know how a batch file when started can print the current search path.

    Basic batch-file knowledge would also be engouh to subdivide the batch file and using printouts figure out exactly which line in the batch file that gives this error message.

    Batch files, embedded programming or GUI programming doesn't matter. It's still required to be able to use own logical deductions to debug problems. What is known? What isn't known? Can something be done to reduce the problem into one or more smaller problems?

Reply
  • We do know (or do we?) that the tool can start the batch file. Because the OP have acknowledged (or have he?) that the current working directory when the script is started is the correct one.

    The next thing is that any commands run by the script must either be in the path - or have a full path given.

    And basic batch-file knowledge would be enough to know how a batch file when started can print the current search path.

    Basic batch-file knowledge would also be engouh to subdivide the batch file and using printouts figure out exactly which line in the batch file that gives this error message.

    Batch files, embedded programming or GUI programming doesn't matter. It's still required to be able to use own logical deductions to debug problems. What is known? What isn't known? Can something be done to reduce the problem into one or more smaller problems?

Children
  • Per : find out what the path of the .bat file is (problem: if wrong the file does not run)
    Erik: why worry about it, just start path with drive letter and go on from there

    Erik

  • But not from previous posts:
    Me: Have you tried to let the batch file start with echo of where it was started from?
    OP: yes, i have tried that and it is fine. but still error is not fixed.

    That would imply (?) that uVision can start the batch file, i.e. that the issue isn't with finding the batch file. But that something inside the batch file have a path issue.

    The issue here is that we have an OP who are not the slightest methodical, and who posts answers that may not really relate to the questions. So we do not know exactly where we stand.

    In short - it's easiest to ignore this thread until the OP starts to do own, real, debugging. Methods to debug have already been explained in this thread.