Skip to content

Can't run a .bat file that interacts with DisplaySwitch.exe #109

Closed

Description

@SullieLore

I am trying to run:

@echo off
start "" "%windir%\System32\DisplaySwitch.exe" /external

This .bat works when I run it myself (switches to 1 monitor). However, when I run it through IFTTT/ACC it gives me an error in the run box that Windows cannot find displayswitcher.exe.

Hardware & software info (please complete the following information):

  • [Version of Windows] Windows 11 Beta
  • [Version of AssistantComputerControl] 1.4.4

Activity

  1. SullieLore commented on Aug 5, 2021

    @SullieLore
    Author

    image

  2. changed the title [-]Can[/-] [+]Can't run a .bat file that interacts with DisplaySwitch.exe[/+] on Aug 5, 2021
  3. AlbertMN commented on Oct 9, 2021

    @AlbertMN
    Owner

    Will look at this tomorrow :)

  4. AlbertMN commented on Oct 10, 2021

    @AlbertMN
    Owner

    Getting same issue, only for exe seemingly. not txt or anything.

    Sorry for the super late reply. Doing further testing.

  5. AlbertMN commented on Oct 10, 2021

    @AlbertMN
    Owner

    Ok, so the issue seems to be 32 vs 64 bit, as explained here; https://stackoverflow.com/a/38678712/4880538

    Most likely your app is 32-bit, and in 64-bit Windows references to C:\Windows\System32 get transparently redirected to C:\Windows\SysWOW64 for 32-bit apps. calc.exe happens to exist in both places, while soundrecorder.exe exists in the true System32 only.

    And DisplaySwitch.exe doesn't exist in the 64 bit space, I've also confirmed this in the code. Working on seeing if there's some way to fix it.

  6. added
    under investigationProblem or question is currently being looked into
    and removed on Oct 10, 2021
  7. AlbertMN commented on Oct 10, 2021

    @AlbertMN
    Owner

    Issue seemingly fixed by disabling the "Prefer 32 bit" option in visual studios. I also added the action display_switch so a custom batch file isn't needed, but it's native :) More info on that coming soon.

    (The following parameters can be used; nothing to just show the display switcher, so you can click yourself, or "external", "internal", "extend", "clone" to automatically trigger the given mode)

  8. AlbertMN commented on Oct 10, 2021

    @AlbertMN
    Owner

    @SullieLore test version with the proposed fix here; #115

  9. SullieLore commented on Oct 11, 2021

    @SullieLore
    Author

    Thanks for working on this! Great to hear the command is native now, as that is a better solution than messing with workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

under investigationProblem or question is currently being looked into

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions