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. 

  • Hello mdoherty,

    When Desktop Authority executes an application launcher element it may use either the logged-on user or it can run as administrator, if you check the option to run as administrator, then Desktop Authority runs the Application Launcher with the SLUser (or any credential configured as the domain user account) as a local administrator account in the targeted computer, however, if you don't need administrator permissions to execute the element then you may leave the check box unselected and the element will run in the logged-in user context (without impersonation). Being that said, all you need to do is configure your Application Launcher with the "Run as administrator" box unchecked. If you need further assistance, please do not hesitate to create a service request in our Support Portal at https://support.quest.com/create-service-request or calling 1.800.306.9329 or 949.754.8000 Monday to Friday from 8:00 am to 8:00 pm EDT. 

  • To launch a script as the current logged-in user, you can utilize the appropriate command or script invocation method within your operating system. For example, on Unix-based systems, you might run a script directly with the current user's permissions by executing it through a terminal drayage solutions Los Angles:

    bash
    Copy code
    ./your-script.sh

    Alternatively, if you're using Windows, you can run a batch or PowerShell script with the current user's credentials by simply double-clicking the script or invoking it through a command prompt without needing additional user permissions.

  • With over 4 years experience in driving SEO Sydney Agency organic traffic and engagement, I’ve successfully ranked websites like Landvalue.au, Hourglasswaist.com.au and Tsikot.com. Let’s boost your online presence together!

  • 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.