Jump to content

mycrc_loki

Members
  • Posts

    1
  • Joined

  • Last visited

  1. hello, i just want to share my solution for this problem: often the parameter -i 1 will not work when your current user has a different interface ID, so when launching some programs, like PLEX Web Server for example the program will be launched with wrong settings/default settings instead of your current users settings. For some programs there are no difference but i found this problem for plex and others. You can get the current ID with this command on powershell: query session and use it on the script/remote powershell every time or if you want here my solution my solution, i hope can help someone on pulseway script editor run as powershell this script : cd\ cd "C:\myScriptRUN\PSTools" .\id_plex.cmd the script with this mod: id_plex.cmd for /f "tokens=4 delims= " %%G in ('tasklist /FI "IMAGENAME eq ctfmon.exe" /NH') do SET RDP_SESSION=%%G echo Current RDP Session ID: %RDP_SESSION% cd\ cd "C:\myScriptRUN\PSTools" .\psexec.exe -i %RDP_SESSION% -d -u YOURUSERNAME -p YOURPASSWORD "S:\....\plex.exe" This script will get the current ID from a classic process cftfom.exe (for example) that is usually with the current ID of the user and than run psexec with that ID Username and password are optional but I recommend them. PS: yes the first time run /accepteula and follow the guide to add psexec for windows %path% Also i will link my script (for windows), instead of running this script for every kind of program/path i will just run my own program with different parameter so replace this .\psexec.exe -i %RDP_SESSION% -d -u YOURUSERNAME -p YOURPASSWORD "S:....\plex.exe" with : .\psexec.exe -i %RDP_SESSION% -d --u YOURUSERNAME -p YOURPASSWORD "S:\myREPO\pulseway\pulseway.exe" 1 Where : pulseway.exe is this script and 1 = your program, in my example 1 = plex, 2 = Team Viewer , 3 = etc.. If you want it's here: https://github.com/iTZUNAMI/ahk-pulseway-quicklaunchexe
×
×
  • Create New...