Welcome to the community forums for Theopenem. All responses are provided by other users that wish to help out. Theopenem will not respond to these posts. If you require more assistance than what the community can provide, we offer various paid support options.


  • Hello. I created a batch script module attempting to change extended display to cloned display with command displayswitch.exe 2 with no results. Running a batch on the device works fine though. Any ideas how to resolve? Thanks.


  • the client runs as system, perhaps the displayswitch command needs to be run as a user? Not sure, not familiar with the command.


  • @theopenem_admin If I leave a batch file on the C drive of the computer can I run it from a certain module type?


  • @cracking-skulls The log file doesn't show any errors.

    2023-02-09 13:43:29,407 INFO [39] PolicyExecutor - Executing Policy c2eed9b0-43fb-413c-be49-76ae18bc54c3 (Instant Module )
    2023-02-09 13:43:29,407 DEBUG [39] PolicyExecutor - Evaluating Conditions For Instant Module
    2023-02-09 13:43:29,407 DEBUG [39] PolicyExecutor - No Conditions Found For Module
    2023-02-09 13:43:29,407 DEBUG [39] PolicyExecutor - Evaluating Conditions For SB-CloneDisplay-Resolution-1024x768
    2023-02-09 13:43:29,407 DEBUG [39] PolicyExecutor - No Conditions Found For Module
    2023-02-09 13:43:29,407 INFO [39] ModuleScriptManager - Running Script Module: SB-CloneDisplay-Resolution-1024x768
    2023-02-09 13:43:29,407 DEBUG [39] ServiceImpersonationTask - Starting Impersonation Task
    2023-02-09 13:43:29,423 DEBUG [39] ApiRequest - ProvisionedComm/Policy/GetImpersonationAccount/
    2023-02-09 13:43:29,595 DEBUG [39] ServiceProcess - Starting Command: cmd.exe /c "net localgroup "backup operators" domain\username /add"
    2023-02-09 13:43:35,209 DEBUG [39] ServiceProcess - Starting Command: cmd.exe /c "net localgroup "backup operators" domain\username /delete"
    2023-02-09 13:43:35,319 INFO [39] ModuleScriptManager - 0
    2023-02-09 13:43:35,319 INFO [39] ModuleScriptManager - Script Module: SB-CloneDisplay-Resolution-1024x768 Finished
    2023-02-09 13:43:35,319 INFO [39] PolicyExecutor - Finished Executing Policy c2eed9b0-43fb-413c-be49-76ae18bc54c3 (Instant Module )
    2023-02-09 13:43:35,319 INFO [39] PolicyRunner - Policies Complete. Starting Policy Cleanup.
    2023-02-09 13:43:35,319 INFO [39] PolicyRunner - Submitting Policy Results
    2023-02-09 13:43:35,350 DEBUG [39] ApiRequest - ProvisionedComm/Policy/AddHistory/
    2023-02-09 13:43:35,491 INFO [39] PolicyRunner - Completed Submitting Policy Results
    2023-02-09 13:43:35,506 INFO [39] PolicyRunner - Cleaning Policy Cache
    2023-02-09 13:43:35,506 DEBUG [39] ServiceFileSystem - Deleting Directory C:\Program Files\Toec\AppData\1fe4bf9f-815d-40ee-bc66-6546eb987e72


  • @cracking-skulls The batch file is created in the AppData directory. Double clicking the batch runs fine.

    467ddeeb-5b65-49b8-9e43-411ec09ee323-image.png


  • I'm assuming this command requires and interactive ui to work, which the client running as a service won't provide. You could try setting the policy to run at login which changes the context to the current user instead of a service. The obvious downside though is that it only runs at login.


  • @theopenem_admin Thought you might find this of interest. There is a tool called PsExec that can remotely call up gui applications via command line. Can be downloaded from https://learn.microsoft.com/en-us/sysinternals/downloads/psexec. Below are some examples:

    psexec \\computername -u domain\username -p password -i 1 -d notepad
    psexec \\computername -u username -p password -i 1 -d C:\Windows\System32\DisplaySwitch.exe 2
    

    Perhaps this can be integrated into TOEMS?