9

I am trying to get some code running which uses make. I've downloaded and installed both MinGW (standard 32 bit) and TDM-GCCs flavor of MinGW on my 64-bit Windows 7 machine.

When I run make (i.e. mingw32-make.exe) in Administrator mode, I get the following error message:

Windows cannot access the specified path, or file. You may not have the appropriate permissions to access the item.

The weird/scary part is that, upon running, it immediately deletes the exe file.

I ran a checksum SHA1 as recommended in the comments using the Microsoft (R) File Checksum Integrity Verifier V2.05:

C:\path\to\folder>fciv.exe -sha1 mingw32-make.exe
//
// File Checksum Integrity Verifier version 2.05.
//
c8ae5c780ab7bed652883d6443b5bfe5e23d30c9 mingw32-make.exe

I don't understand what this output means, but maybe it's helpful to someone.

Notes:

  1. This happens regardless of where the file is located on my pc.
  2. This behavior is specific to the make program (others such as gfortran and gcc appear to be working fine)
  3. Renaming the file makes no difference.
  4. I am an administrator on the pc
  5. Same behavior when I run the program from the explorer or command line.
  6. My anti-virus program (Avast) does not detect any problems with the file when I scan it.
  7. I got the MinGW setup file from this SourceForge page.
  8. I got the TDM-GCC web installer from this page.
  9. The file size is 219,662 bytes (from both the main MinGW and TDM-GCC packages)
  10. I have run make from the command line where I have started the command prompt by way of selecting Run as Administrator in the context menu.
  11. I have also tried to run make by selecting Run as Administrator when I have it selected.
  12. I run the command mingw32-make when this behavior occurs. I have also tried renaming it to things like make and foo with the same result.
  13. The first time this happened with both MinGW it deleted the original file and I re-installed it using the mingw-get application. From thereon after I started making copies of the original mingw32-make for testing.
  14. For the make executable, I have all permissions (including Read & execute) except the special permissions field.
13
  • 1
    Anti-virus software?
    – tripleee
    Feb 4, 2016 at 6:50
  • @tripleee I don't think so. Avast has been pretty vocal in the past when it doesn't like something I'm running. Feb 4, 2016 at 6:57
  • In order for anyone to repro this, let alone troubleshoot, you need to provide very specific details about this exact binary. Exactly where did you obtain it; what is its size and SHA1 checksum?
    – tripleee
    Feb 4, 2016 at 7:07
  • 1
    @tripleee edited my question to include the requested info. Feb 6, 2016 at 15:44
  • 1
    Thanks. The SHA1 signature is a simple way for someone to verify that they have exactly the same file. Even a one-bit difference in the binary will produce a completely different hash.
    – tripleee
    Feb 6, 2016 at 16:01

2 Answers 2

3

After using the process manager I found out it was indeed Avast that was the problem :S A couple of lines revealed avast actually deleted the file before windows got around to executing it, which was the reason for the windows message. I put Avast on 'Silent Mode' a while back; I thought the only purpose of this mode was to suppress notifications about minor updates, but apparently it also gave Avast permission to deal with 'threats' silently as well.

After figuring that out the solution was straightforward. I just went into the settings and created an exception for the mingw32-make.exe file. It now runs without issue.

Thanks very much for your help everyone!

1

User account has administrator privilege but when user started to work , not all privilege are taken in account , just start your application for compiling with run with administrator mode try this : https://technet.microsoft.com/en-in/library/cc781763(v=ws.10).aspx

3
  • I am the only user on this computer; I can't run as any other user. Feb 4, 2016 at 7:03
  • actually when you have any app and you want it run with administrator privileged , then you have explicitly specify that you want it run with admin privilege .
    – Ganesh K
    Feb 4, 2016 at 7:07
  • This doesn't explain why the file would disappear. Feb 6, 2016 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.