Mblock all versions, Arduino 1.6.5 does not launch, with java error!


#1

Hi,

I really need your help and expertise,The problem concerns a park of more than 6000 computers under SEVEN.

For an educational use, i have to install the mBlock (3.3.8) software on college computers, but when uploading to arduino, the interface of arduino does not launch …

With arduino_debug, I get:

Loading configuration…
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147)
at processing.app.windows.Platform.getFolderPathFromRegistry(Platform.java:70)
at processing.app.windows.Platform.recoverSettingsFolderPath(Platform.java:55)
at processing.app.windows.Platform.init(Platform.java:50)
at processing.app.Base.guardedMain(Base.java:153)
at processing.app.Base.main(Base.java:137)

Thanks.


#2

Hi Mightymax62,

Please install the mBlock 3.4.2 have a try.
Once still the issue, is it possible to take a video for the whole operation while uploading to Arduino.


#3

Same here. We are runnig v. 3.4.2. We found out that a user outside the server-groupe-policies can upload programs to the robotor. But as soon as the user gets added to the Domain and gets under influance of the groupe-policies he can’t upload any programs. Uploading the defaul Program to the MegaPi is possible at any time.
I assume that somewhere in the process of compiling the scrath-programm to adruiono compatible code the groupe-policies stop that process.


#4

Hi Lars,

Recently we have published the mBlock 3.4.3, please totally uninstall the previous one and try the latest one.
Besides, may I know what is your server-groupe-policies, is there any special limit settings for this kind group?

Once still the issue, could you please take a video to show the processes of uploading a program with mBlock outside the group and inside th group?


#5

Hi,
i’ll talk to our administrators because i’m not the owner of the server. The groupe-policies come from the CERT-Team of the German armed forces. Their policies are very strict and there are a hundreds of policies to be set. I’m working on it and try to find the policy which blocks the compiling-process. At the moment i think it’s a policy which is protecting the Windows regestry or a policy which is protecting the commandline-interface.

I think it’s the try…catch block in the platform.java file.

" protected void checkAssociations() {
63 try {
64 String knownCommand =
65 Registry.getStringValue(REGISTRY_ROOT_KEY.CLASSES_ROOT,
66 DOC + “\shell\open\command”, “”);
67 if (knownCommand == null) {
68 if (Preferences.getBoolean(“platform.auto_file_type_associations”)) {
69 setAssociations();
70 }
71
72 } else if (!knownCommand.equals(openCommand)) {
73 // If the value is set differently, just change the registry setting.
74 if (Preferences.getBoolean(“platform.auto_file_type_associations”)) {
75 setAssociations();
76 }
77 }
78 } catch (Exception e) {
79 e.printStackTrace();
80 }
81 }
"


#6

I think I’ve found a solution to this problem, it seems to have something to do with the group policy settings on some Windows 7 machines that block the java component in mBlock.

Please check first:

1/ Download and install latest version of Mblock.

2/
Close mBlock.
Remove folder C:\Users\USERNAME\AppData\Roaming\com.makeblock.ScratchX.X.X

Test again. If still no success, then:

3/
Use this tool from Symantec to unblock registry.
https://www.symantec.com/security_response/writeup.jsp?docid=2004-050614-0532-99

Download, then right-click on the file and choose “Install”.

In case the link goes dead, or if you rather not click on unknown downloaded files from the Internet, here’s the content of the inf-file from Symantec.

You could create a text file in Notepad, copy and paste the code below. Save the file as ANYNAME.inf, right-click and choose install.


[Version]
Signature="$Chicago$"
Provider=Symantec

[DefaultInstall]
AddReg=UnhookRegKey

[UnhookRegKey]
HKLM, Software\CLASSES\batfile\shell\open\command,"""%1"" %
HKLM, Software\CLASSES\comfile\shell\open\command,”""%1"" %

HKLM, Software\CLASSES\exefile\shell\open\command,”""%1"" %
HKLM, Software\CLASSES\piffile\shell\open\command,”""%1"" %

HKLM, Software\CLASSES\regfile\shell\open\command,“regedit.exe “”%1"”“
HKLM, Software\CLASSES\scrfile\shell\open\command,””"%1"" %*"
HKCU, Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableRegistryTools,0x00000020,0


I hope this will help someone, as this problem has been a real pain to figure out.

Regards,

Andreas


Upload won't work
#7

Thank you, your reflections my bets on a track that allowed me to solve the problem. In fact we use software to limit the actions of students on the posts (for the smart little ones). And a rule of this software blocks the modification of the registry for the group students, by deactivating this rule, the last version of Mblock can finally upload!
Thank you for your help.


#8

Thanks for the answer.
Our IT-Guys would not deactivate any restriction of the registry in our network. Same problem that mightymax62 has. We need to protect it from any modifications by the students. So there remains only the solution with the stand-alone pc without any networkconnection. On this stand-alone pc they can deactivate the registry group-policies.


#9

We have the same problem with unprivileged users at our schools. We solved the problem by renaming mBlock\Arduino to Arduino.old and copying the Arduino install folder from Arduino IDE version 1.8.1 into the mBlock folder. Then we copied the ‘portable’ folder from the old Arduino folder to the new one and gave ‘Modify’ permissions on the preferences.txt file inside it.
That seems to have done the trick.
I thought it was a GPO affecting the command prompt too. Turns out it’s possible to bypass this.


#10

Hi,
Thanks
for your reply, I will try the new version 3.4.3, I saw that it solves a
problem “Open in Arduino IDE” does not work in some Windows versions"
because I already had this problem with mBlock.
I keep you informed of my tests as soon as possible.


#11

It worked for me, thanks a lot.

the upload is super slow though. But better than nothing.


#13

Here is a tested solution:

mBlock3 cannot upload program to robot using Arduino

Install mBlock3 (mBlock_win_V3.4.11.exe) with all the default settings.
Target folder is C:\Program Files (x86)\mBlock
After installing,
Delete the Arduino folder in C:\Program Files (x86)\mBlock\

Install Arduino ( arduino-1.8.5-windows.exe) but this time change the

Destination folder to C:\Program Files (x86)\mBlock\Arduino
The default is C:\Program Files (x86)\Arduino
This will replace the Arduino folder you have deleted earlier.

mblock3 should now be able to upload the program


#14

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.