When i try to start KNIME 5.1 on corp laptop windows 10 enterprise ( not allow to run powershell ) It popup with powershell.exe blocked and then KNIME failed to start.
Per log it seems checking Windows Defender is enabled or not ( Definitely on for Corp Laptop) via powershell script, however because powershell is blocked , it failed to start.
Is there a way to skip such check for KNIME 5.1 from config?
( we can run old version KNIME 4.1 as not perform powershell script) , and add KNIME to be excluded is impossible per policy.
!ENTRY org.eclipse.osgi 4 0 2023-09-28 10:47:19.862
!MESSAGE Application error
!STACK 1
java.io.IOException: GetExitCodeProcess error=6, The handle is invalid
at java.base/java.lang.ProcessImpl.getExitCodeProcess(Native Method)
at java.base/java.lang.ProcessImpl.waitFor(Unknown Source)
at org.knime.product.rcp.startup.WindowsDefenderExceptionHandler.executePowerShellCommand(WindowsDefenderExceptionHandler.java:309)
at org.knime.product.rcp.startup.WindowsDefenderExceptionHandler.executePowerShellCommand(WindowsDefenderExceptionHandler.java:284)
at org.knime.product.rcp.startup.WindowsDefenderExceptionHandler.isDefenderEnabled(WindowsDefenderExceptionHandler.java:175)
at org.knime.product.rcp.startup.WindowsDefenderExceptionHandler.checkForAndAddExceptionToWindowsDefender(WindowsDefenderExceptionHandler.java:141)
at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:147)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
There is a workaround to resolve your issue. You can navigate to <AP-Install-Dir>/configuration/org.knime.core/ and create a file named “startup-dialog-noshow” with the value true as its content. Please make sure the file has no extension.
You can create a .txt file and add the value (true) in it and then change the file name to startup-dialog-noshow and remove the file extension extension.
This should hopefully solve your issue.
That file is normally created when you dismiss the dialog that shows up after the code invoking powershell has run with the “Don’t show again” option checked. When the file exists, the Windows Defender checks are not performed.
As @armingrudd said, manually creatin the file is a workaround. The checks that are performed here are not mandatory, and should not prevent the application from starting. I’ve created an internal bug ticket (AP-21233) for this issue.
Currently the work around works and hope to this could be fixed in near future.
Is there some release note or site that i can track the status of the bug ticket so i can inform my team start using the new one?
I’ve tried to reproduce the problem with powershell.exe disabled using Windows Group Policies, but AP starts up fine for me. There are (expected) errors of the form ERROR main WindowsDefenderExceptionHandler in the log file, but everything else works.
Can you describe in a bit more detail what exactly happens when you try to start KNIME AP without the startup-dialog-noshow file present? Which mechanism is being used to block powershell?
It’s Corp Laptop so have lots security and scan app installed there. sorry i can’t share more details but when it detect KNIME trying to run powershell.exe, it halt and pop up window indicate this application is trying to run powershell.exe and showing some corp policy info. once i close it, KNIME pop up window let me choose workspace, after click next, it pop up a failed message including log file path and exit.
I do have another question regarding the work around, for .exe install file as once installed to C:\Program Files\Knime under administrator, As I log on with Corp LAN ID, I do not have access to create the folder then copy into the file. is there any other folder that normal user have access to apply this work around?
It works for zip format install file as it extract to folder normal user could write.
I ask IT to create the folder copy in the file under C:\Program Files\Knime. however still getting PowerShell.exe error.
The workflow around do works for the download version. and i notice under the org.knime.core folder, it create another two file once confirm workspace.
knime-id
.lock
Because these two files can’t be created under C:\Program Files\KNIME\configuration\org.knime.core, will this cause the powershell.exe issue also?
C:\Program Files\KNIME\configuration\org.knime.core that i don’t have write access:
If the files cannot be created in the installation folder they will be created in your local profile folder instead. This is not the reason for the startup failure.
Test case 1, download zip knime install file and unzip, work around works.
C:\Users[MyUserID]\Downloads\knime_5.1.1\configuration\org.knime.core
Test case 2, download .exe install file and ask IT to install with admin mode, work around not working.
C:\Program Files\KNIME\configuration\org.knime.core