-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot execute ProjectFileParser.exe from user's temp dir in Windows 7 #28
Comments
Well, in fact, for security reasons, it is possible in windows to forbid the execution of a program from the local temp dir. This is the case where I am working. So the only way for me to use this plugin is the copy the ProjectFileParser.exe file in the gradle's temporaryDir. |
it should extract to gradleUserHome dir (~/.gradle) instead (where gradle already put its binaries from wrapper download). Do you know if this folder would be executable-friendly (I'd think it is) ? |
It extracts to the user's temp directory because of this instruction: createTempFile will create a temporary file in the user's temp dir (C:\Users\XXX\AppData\Local\Temp) I think it is better to extract to the gradle build directory of the plugin (build/tmp/msbuild/). This can be done by using the temporaryDir in the msbuild block. I have done a correction here: Do you think that it can be useful to merge to your master branch? |
@roshangautam are you using the latest version which contains the fix? We're using gradle's temporary directory now, but maybe it's still generating in the temp directory upon whatever reasons? The documention is not very clear on where the provided temp directory resides |
I did a fix to put the binary in the plugin directory but it seems that the commit below rolled back to use the user temp directory: file: src/main/groovy/com/ullink/Msbuild.groovy It is not a good idea to extract an exe file into a user temp directory and to execute it from there. Some antivirus may take it for a malware. |
- some anti-virus does not like running executable in user dir - regression for issue Itiviti#28 Change-Id: I93b7d89d7daa831ef05a812f5a69fe0c1fea7a07
- some anti-virus does not like running executable in user dir - regression for issue Itiviti#28 Change-Id: I93b7d89d7daa831ef05a812f5a69fe0c1fea7a07
- some anti-virus does not like running executable in user dir - regression for issue #28 Change-Id: I93b7d89d7daa831ef05a812f5a69fe0c1fea7a07
Hello,
I am using Windows 7 and gradle is not able to execute ProjectFileParser.exe from the users's temp directory (C:\Users\XXX\AppData\Local\Temp).
After a search on google, it seems that the problem comes from the security permission on the temp folder. The user should take ownership and full control of the temp folder.
Anyway, I think that it would be great to add a property (parserTempDir) to the MsBuild task. If this property is null we save the ProjectFileParser.exe in the user temp dir otherwise we save the file in the parserTempDir. So we can do something like that in Gradle:
msbuild {
parserTempDir = temporaryDir
...
}
With this, the ProjectFileParser will be saved in the build/tmp/msbuild directory.
The text was updated successfully, but these errors were encountered: