Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Can't run DisplaySwitch.exe
Can't run DisplaySwitch.exe
I can manually run C:\Windows\System32\DisplaySwitch.exe, but it's stopped working from within EG, perhaps because of the Creators Win 10 update?
I've tried running as an admin too, but it used to work without doing that.
Any ideas?
I've tried running as an admin too, but it used to work without doing that.
Any ideas?
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Can't run DisplaySwitch.exe
I am not sure what DisplaySwitch.exe is.. but from what the name implies is it does something with your monitors or display adapters..
With each new release of Windows 10 Microsoft keeps on locking out various components of the Windows driver system. they are doing this because they are trying to lock out the OS from malicious code from malware and spyware.. The unfortunate thing is it's turning the OS into something like a Crapintosh. where you can't do anything in it very easily. They seem to be hammering down on what applications/drivers are able to manipulate the OS to do. So things like an application is not allowed to write anything to the Program Files directory. or the removal of unsigned drivers. I am sure there are more we just haven't discovered them as of yet. And the really messed up thing is that Microsoft is not telling anyone of these changes. Or if they are they are giving incorrect information about it. It's creating a large problem for us over here in EG land.
With each new release of Windows 10 Microsoft keeps on locking out various components of the Windows driver system. they are doing this because they are trying to lock out the OS from malicious code from malware and spyware.. The unfortunate thing is it's turning the OS into something like a Crapintosh. where you can't do anything in it very easily. They seem to be hammering down on what applications/drivers are able to manipulate the OS to do. So things like an application is not allowed to write anything to the Program Files directory. or the removal of unsigned drivers. I am sure there are more we just haven't discovered them as of yet. And the really messed up thing is that Microsoft is not telling anyone of these changes. Or if they are they are giving incorrect information about it. It's creating a large problem for us over here in EG land.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Can't run DisplaySwitch.exe
check the file permissions. I just looked it up and it's a part of windows. and windows may have chnage the permissions to the file.. if it works as administrator this is probably what the issue is.
Re: Can't run DisplaySwitch.exe
You can't change the permissions, or reename/delete it. Only 'TrustedInstaller' has full permission. The rest just have read & read and execute.kgschlosser wrote:check the file permissions. I just looked it up and it's a part of windows. and windows may have chnage the permissions to the file
It doesn't in EG, with or without admin ticked.if it works as administrator this is probably what the issue is.
Re: Can't run DisplaySwitch.exe
I use it for my HTPC to swap between my monitor and my TV.kgschlosser wrote:I am not sure what DisplaySwitch.exe is.. but from what the name implies is it does something with your monitors or display adapters..
If I run a batch file with:
Code: Select all
start "" "C:\Windows\System32\DisplaySwitch.exe" /clone
exitCode: Select all
start "" "C:\Windows\System32\DisplaySwitch.exe" /external
exitI've tried running a batch file from EG, a shortcut to the .bat file, and tried to use Send Keystrokes, but unfortunately the emulation of {Home] doesn't work so I can't do:
{Win+P}
{Home}
{Down}
{Return}
{Esc}
for Duplicate
or
{Win+P}
{End}
{Return}
{Esc}
for Second screen only.
All methods fail. I've tried EG's "Set Display Preset" but it doesn't differentiate between the PC monitor and the TV, just the resolutions...and then only sometimes.
Not sure what to try next, maybe nVidia control panel has a hotkey or something.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Can't run DisplaySwitch.exe
how come you are using batch files?
you can use the Run Application action without the need for the batch files.
and I can locate the keycode for the home key as well.. give me a minute on that one.. I did up a post a while back that had all of the keycodes listed..let me go and find it.
you can use the Run Application action without the need for the batch files.
and I can locate the keycode for the home key as well.. give me a minute on that one.. I did up a post a while back that had all of the keycodes listed..let me go and find it.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Can't run DisplaySwitch.exe
ok so here is the complete list of keys that can be used in the Send Keys action for the home key it could be that it is being sent as the number pad home. so you will probably want to try out the ones that have OEM in them or the ones that start with a U
Code: Select all
key code
------------------------------
{0} 48
{1} 49
{2} 50
{3} 51
{4} 52
{5} 53
{6} 54
{7} 55
{8} 56
{9} 57
{A} 65
{Accept} 30
{Add} 107
{Alt} 18
{AltGr} 10
{Apps} 93
{Attn} 246
{B} 66
{BACK} 8
{Backspace} 8
{BrowserBack} 166
{BrowserFavorites} 171
{BrowserForward} 167
{BrowserHome} 172
{BrowserRefresh} 168
{BrowserSearch} 170
{BrowserStop} 169
{C} 67
{CAPITAL} 20
{CONTROL} 17
{Cancel} 3
{CapsLock} 20
{Clear} 12
{Convert} 28
{CrSel} 247
{Ctrl} 17
{D} 68
{DEL} 302
{Decimal} 110
{Delete} 46
{Divide} 111
{Down} 40
{E} 69
{ENTER} 13
{ESC} 27
{End} 35
{EraseEof} 249
{Escape} 27
{ExSel} 248
{Execute} 43
{F} 70
{F1} 112
{F10} 121
{F11} 122
{F12} 123
{F13} 124
{F14} 125
{F15} 126
{F16} 127
{F17} 128
{F18} 129
{F19} 130
{F2} 113
{F20} 131
{F21} 132
{F22} 133
{F23} 134
{F24} 135
{F3} 114
{F4} 115
{F5} 116
{F6} 117
{F7} 118
{F8} 119
{F9} 120
{Final} 24
{G} 71
{H} 72
{Hanja} 25
{Help} 47
{Home} 36
{I} 73
{INS} 301
{Insert} 45
{J} 74
{Junja} 23
{K} 75
{Kana} 21
{L} 76
{LAlt} 164
{LButton} 1
{LCtrl} 162
{LShift} 160
{LWin} 91
{LaunchApp1} 182
{LaunchApp2} 183
{LaunchMail} 180
{LaunchMediaSelect} 181
{Left} 37
{M} 77
{MButton} 4
{MediaNextTrack} 176
{MediaPlayPause} 179
{MediaPrevTrack} 177
{MediaStop} 178
{ModeChange} 31
{Multiply} 106
{N} 78
{NonConvert} 29
{Noname} 252
{NumLock} 144
{Numpad0} 96
{Numpad1} 97
{Numpad2} 98
{Numpad3} 99
{Numpad4} 100
{Numpad5} 101
{Numpad6} 102
{Numpad7} 103
{Numpad8} 104
{Numpad9} 105
{O} 79
{Oem1} 186
{Oem102} 226
{Oem2} 191
{Oem3} 192
{Oem4} 219
{Oem5} 220
{Oem6} 221
{Oem7} 222
{Oem8} 223
{Oem92} 146
{Oem93} 147
{Oem94} 148
{Oem95} 149
{Oem96} 150
{OemClear} 254
{OemComma} 188
{OemE1} 225
{OemE3} 227
{OemE4} 228
{OemE6} 230
{OemE9} 233
{OemEA} 234
{OemEB} 235
{OemEC} 236
{OemED} 237
{OemEE} 238
{OemEF} 239
{OemF0} 240
{OemF1} 241
{OemF2} 242
{OemF3} 243
{OemF4} 244
{OemF5} 245
{OemMinus} 189
{OemPeriod} 190
{OemPlus} 187
{P} 80
{PA1} 253
{PGDOWN} 34
{PGUP} 33
{Packet} 231
{PageDown} 34
{PageUp} 33
{Pause} 19
{Play} 250
{Print} 42
{PrintScreen} 44
{ProcessKey} 229
{Q} 81
{R} 82
{RAlt} 165
{RButton} 2
{RCtrl} 163
{RShift} 161
{RWin} 92
{Return} 13
{Right} 39
{S} 83
{SPC} 32
{ScrollLock} 145
{Select} 41
{Separator} 108
{Shift} 16
{Sleep} 95
{Space} 32
{Subtract} 109
{T} 84
{TAB} 9
{Tabulator} 9
{U} 85
{U00} 0
{U07} 7
{U0B} 11
{U0E} 14
{U0F} 15
{U16} 22
{U1A} 26
{U3A} 58
{U3B} 59
{U3C} 60
{U3D} 61
{U3E} 62
{U3F} 63
{U40} 64
{U5E} 94
{U88} 136
{U89} 137
{U8A} 138
{U8B} 139
{U8C} 140
{U8D} 141
{U8E} 142
{U8F} 143
{U97} 151
{U98} 152
{U99} 153
{U9A} 154
{U9B} 155
{U9C} 156
{U9D} 157
{U9E} 158
{U9F} 159
{UB8} 184
{UB9} 185
{UC1} 193
{UC2} 194
{UC3} 195
{UC4} 196
{UC5} 197
{UC6} 198
{UC7} 199
{UC8} 200
{UC9} 201
{UCA} 202
{UCB} 203
{UCC} 204
{UCD} 205
{UCE} 206
{UCF} 207
{UD0} 208
{UD1} 209
{UD2} 210
{UD3} 211
{UD4} 212
{UD5} 213
{UD6} 214
{UD7} 215
{UD8} 216
{UD9} 217
{UDA} 218
{UE0} 224
{UE8} 232
{UFF} 255
{Up} 38
{V} 86
{VolumeDown} 174
{VolumeMute} 173
{VolumeUp} 175
{W} 87
{WIN} 347
{X} 88
{XButton1} 5
{XButton2} 6
{Y} 89
{Z} 90
{Zoom} 251
Re: Can't run DisplaySwitch.exe
I can manually run C:\Windows\System32\DisplaySwitch.exe, but it's stopped working from within EGkgschlosser wrote:how come you are using batch files?
you can use the Run Application action without the need for the batch files.
I circumnavigated the problem by making a windows shortcut to the .bat file, then a windows keyboard shortcut, then emulated that keyboard shortcut in EG with Send Keystrokes...hardly ideal, but I need something at the moment. Frustrating having my Kodi setup down. The not found error also hoses the rest of EG and its macros because no events are received until after you press OK on the error box.and I can locate the keycode for the home key as well.. give me a minute on that one.. I did up a post a while back that had all of the keycodes listed..let me go and find it.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Can't run DisplaySwitch.exe
paste this into your tree and give it a go. maybe it will work for ya
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
<Action XML_Guid="{52AEA35B-5E5F-4085-9AB1-D87D5371B9BE}">
System.Execute(u'DisplaySwitch.exe', u'/external', 3, False, 5, u'c:\\Windows\\System32', False, False, u'', False, False, False, False)
</Action>
</EventGhost>
Re: Can't run DisplaySwitch.exe
The same error unfortunately.kgschlosser wrote:paste this into your tree and give it a go. maybe it will work for ya
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?> <EventGhost Version="0.5.0-rc4"> <Action XML_Guid="{52AEA35B-5E5F-4085-9AB1-D87D5371B9BE}"> System.Execute(u'DisplaySwitch.exe', u'/external', 3, False, 5, u'c:\\Windows\\System32', False, False, u'', False, False, False, False) </Action> </EventGhost>
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Can't run DisplaySwitch.exe
it strange because it's stating that it can't find it. try this one. this should be a different location for the program.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
<Action XML_Guid="{52AEA35B-5E5F-4085-9AB1-D87D5371B9BE}">
System.Execute(u'c:\\Windows\\SysWOW64\\DisplaySwitch.exe', u'/external', 3, False, 5, u'c:\\Windows\\SysWOW64', False, False, u'', False, False, False, False)
</Action>
</EventGhost>
Re: Can't run DisplaySwitch.exe
This one works for me (Win10-64Bit):
No file path, just the file name. WOW64 filesystem redirection disabled.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="WIP">
<Action XML_Guid="{873B48B5-EDD2-459D-8652-DA9A0077D225}">
System.Execute(u'DisplaySwitch.exe', u'/external', 0, False, 2, u'', False, True, u'', False, False, False, False)
</Action>
</EventGhost>Re: Can't run DisplaySwitch.exe
Edit: The same error as posted above.kgschlosser wrote:it strange because it's stating that it can't find it. try this one. this should be a different location for the program.
That did the trick, thank you!topix wrote:No file path, just the file name. WOW64 filesystem redirection disabled.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Can't run DisplaySwitch.exe
where there is a will there is a way..... thanks topix for the help... I am in the stone age with windows 7 but it's solid like a rock... HA pun intended!!
my workstation up time... 105.12143766203703703703703703704 days.... and the only reason why i powered it off then was because I had to move my desk when i cut the floor open to do some work on my house. before that it had to be close to a year.
how about your Windows 10 up time.. it has to be an actual work station.. meaning you actually use it and it's not sitting in a closet somewhere just humming away.
my workstation up time... 105.12143766203703703703703703704 days.... and the only reason why i powered it off then was because I had to move my desk when i cut the floor open to do some work on my house. before that it had to be close to a year.
how about your Windows 10 up time.. it has to be an actual work station.. meaning you actually use it and it's not sitting in a closet somewhere just humming away.
