VMware Horizon Community
kriswauters1
Contributor
Contributor

DirectFlex not triggered when launching app through batch file

Hi everyone

I have KeePassXC in DEM, which has DirectFlex enabled on C:\Program Files\KeePassXC\KeePassXC.exe
This works when KeePassXC is launched through the shortcut in the Start Menu of Windows.

However when I launch KeePassXC from a batch (.bat) script, this doesn't seem to trigger DirectFlex
I can see it in the log file.
I use start "" "C:\Program Files\KeePassXC\KeePassXC.exe" in the batch file
When I call the Start Menu shortcut from the batch file, this works.

Is this normal behaviour?

Reply
0 Kudos
7 Replies
DEMdev
VMware Employee
VMware Employee

Hi @kriswauters1,

That should work just fine, as it does not matter how an executable is launched; it's the launch itself that triggers DirectFlex.

To make sure, I just installed KeePassXC-2.7.4-Win64.msi and created a DEM config file (enabled DirectFlex with executable C:\Program Files\KeePassXC\KeePassXC.exe, capturing folder <AppData>\KeePassXC (although that's not really relevant.))
I also created a batch file with start "" "C:\Program Files\KeePassXC\KeePassXC.exe", and running that batch file results in a DirectFlex import. Exiting the application results in a DirectFlex export.

Not sure what troubleshooting guidance to provide, to be honest... Can you share the DEM config file and the batch file as attachments?

Reply
0 Kudos
system32AUT
Enthusiast
Enthusiast

can you share a pic from your DirectFlex ? i.e. my notepad++ looks like that, did you set the "enable DirectFlex" flag?

system32AUT_0-1674733119259.png

 

cheers
Dominik

 

Reply
0 Kudos
kriswauters1
Contributor
Contributor

kriswauters1_0-1674893344127.png

Thx for the help!
This is the screenshot.

I see that my reply with more info did not get posted so I'll try again

The log file clearly shows DirectFlex is not triggered when called from the batch file with      start "" "C:\Program Files\KeePassXC\KeePassXC.exe" --allow-screencapture

, but if I call the start menu shortcut:      start "" "%APPDATA%\Microsoft\Windows\Start Menu\Programs\KeePassXC.lnk"
which points to         "C:\Program Files\KeePassXC\KeePassXC.exe" --allow-screencapture
I does get triggered

Reply
0 Kudos
system32AUT
Enthusiast
Enthusiast

ok, just try the exe then:

system32AUT_0-1675061460930.png

 

Reply
0 Kudos
system32AUT
Enthusiast
Enthusiast

... and after you use only the *.exe without Folder Structure you can check you settings with "Validate DirectFlex". Anything there?

system32AUT_0-1675086881494.png

 

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi @kriswauters1,

Your screenshot shows that Export moment is set to Export at logoff. That means that as soon as a DirectFlex import has taken place for a session, no further DirectFlex activity will occur for that session.

Just wanted to explicitly call that out, to prevent that from possibly interfering with your experiments.

Reply
0 Kudos
kriswauters1
Contributor
Contributor

Export at logoff was specifically set as to prevent the constant exporting and importing every time KeePassXC is opened and closed.
Thx for mentioning 😊

To test it out I changed it back to "Use global settings"

So I tried it with changed "Executables" set, but I always get the same result.
If i change it to notepad.exe, it works as expected.
But not with KeePassXC.exe.
I think this is because KeePassXC has a screen capture protection built-in.
This effectively makes it that, by default, KeePassXC does not work in a VDI (there is no window, or only a black one)
With the aforementioned command line parameter --allow-screencapture that protection is disabled and KeePassXC works.
So I guess this could cause some weird behavior in certain cases.

For me the workaround is to launch KeePassXC from the shortcut instead.

Thx for all the help guys 🤘