Go Down

Topic: SOLVED: Cannot compile: avr-g++.exe is blocked by group policy in AppData (Read 2777 times) previous topic - next topic

GaySwanson

Solution:
Uninstalled IDE. Deleted "C:\users\username\AppData\Local\Arduino15" folder. Reinstalled Arduino IDE in a folder that does not require admin access (I used Documents). In the "Arduino" folder I created a folder named "portable". Then opened the IDE, this creates a sketchbook inside the portable folder. Copied my programs over to that folder, re-installed my libraries I was using (which now install in the portable folder). And am now able to successfully compile and upload.

Original Problem:

Hello all. I do research at a university and am using Arduino's for my research. Today, I was compiling / uploading fine, and then was informed there was an update (by the IDE). After I updated, I could no longer compile.

As of the most recent update, when compiling, I get the error:

fork/exec C:\Users\username\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++.exe: This program is blocked by group policy. For more information, contact your system administrator.
Error compiling for board Arduino/Genuino Uno.

I contacted the system administrator and was told that .exe files are not able to run from AppData "since many viruses run from here - you need to copy the program to a different folder and run it from the new folder." So, how can I update the makefile or whatever needs updated for Arduino to know where to run the avr-g++ executable so I can get programs to compile? I can move the folder to wherever and have Admin access to this computer.

What I have tried: looking up how to do this, with no results. Uninstalling and reinstalling. Uninstalling and installing 1 version prior.

Thanks in advance.

DrAzzy

Sounds like you cannot use any packages installed through board manager. That is a really obnoxious restriction your IT department enforces.


Uninstall Arduino IDE, delete C:\users\username\AppData\Local\Arduino15, and then reinstall latest version of the IDE  and never install or uninstall anything using Board Manager.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

pert

You might be able to get around this restriction by using the IDE in portable mode. To do this you only need to create a folder named portable in the Arduino IDE installation folder. This will cause the updates to be installed to the portable folder insead of the AppData folder. Likely you are able to run executables from that location, otherwise you wouldn't be able to use the IDE.

oqibidipo

I had exactly the same problem at my university. Portable mode solved the problem.

GaySwanson

Thanks everyone for the replies. I will try these solutions tomorrow (Monday) and update if a solution worked.

GaySwanson

Fixed the problem. Solution is now in the original post.

mistyjoe

fork/exec C:\Users\asare\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++.exe: %1 is not a valid Win32 application.
Error compiling for board Arduino/Genuino Mega or Mega 2560.

pert

fork/exec C:\Users\asare\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++.exe: %1 is not a valid Win32 application.
Error compiling for board Arduino/Genuino Mega or Mega 2560.
A similar error was recently reported to the Arduino bug tracker and the developer suggested it might be caused by an antivirus program.

Try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on. If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.

Go Up