Launching script as current logged in user

Hi,

I have a script that i wan to launch with the Application Launcher, but i would like to run it as the current logged in user. The script will read the current logged in users mapped printers and remap them to a new print server. These printer mappings where done manually by the user and not using the DA printer mappings. 

When i run the script now it runs using the SLuser of Desktop authority and of course that account has no printers mapped. If i run the script manually after login it works perfect and remaps the printers associated to the current user logged in. I see no option in DA to allow scripts to run as the current logged in user. Only option is "run as Administrator"

Any help would be appreciated.

thanks Michael. 

Parents
  • To launch a script as the currently logged-in user, ensure that the script is executed within the active user session. This can be achieved using tools or commands that preserve user permissions and environments, such as runas on Windows or sudo -u $(whoami) on Unix-based systems. When the script is launched this way, it inherits the logged-in user's environment variables partial wrap, file permissions, and settings, ensuring seamless execution without unnecessary privilege escalations.

Reply
  • To launch a script as the currently logged-in user, ensure that the script is executed within the active user session. This can be achieved using tools or commands that preserve user permissions and environments, such as runas on Windows or sudo -u $(whoami) on Unix-based systems. When the script is launched this way, it inherits the logged-in user's environment variables partial wrap, file permissions, and settings, ensuring seamless execution without unnecessary privilege escalations.

Children
No Data