Run application with local account after installing with script

Hello my question is the next.

After installing an application through script with administrator privileges, I need to run it with the account that started the session, which is a normal user of the domain.

I understand that I could run a new script for this task but it has to be in the same script that generates the installation of the application.

the client is windows 10

Thank you for your answers

6 Comments   [ + ] Show comments
  • so is it a local or domain user? The title says local account and the text says normal user of the domain - SMal.tmcc 2 years ago
  • sorry,
    they are Domain users - Rodrigo.espinoza 2 years ago
  • So you want to install an application, and then open\run that application with a domain user....

    Is that the same user who installed the application?

    Maybe just task 2 inside a script, and point to launch a program, and select the software's EXE file.

    Now if the user who installed the Application is different, a second script to launch the application is needed, then use Task Chain to link those scripts - Channeler 2 years ago
  • You might be able to use WMI impersonation to launch the program after installation. Or generate a temp scheduled task to launch the program with the logged in user after installation. - flip1001 2 years ago
  • >it has to be in the same script that generates the installation of the application.
    Why does it have to be? - anonymous_9363 2 years ago
    • must be in the same script since the program that executes after the installation must be executed with the account that starts secion - Rodrigo.espinoza 2 years ago
  • I still do not solve it, but what I do for a while is to execute a second script after checking if the program was installed - Rodrigo.espinoza 2 years ago

Answers (1)

Posted by: anonymous_9363 2 years ago
Red Belt

Why not simply install with admin rights, as normal, and use one of the many tools around to get the logged-in user's username and SID (you'll need the SID if you need to write to the user's registry hive, of course)?

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ