Systems Management Question

Single script on managed install

02/06/2020 744 views


I have  a .exe file that needs to be installed followed by a regisrty key to be imported.

the problem is the registry key needs to be imported into the logged on Users registry  Key.

I see scripting can import the key using the logged on user but the install will fail as the logged on user in not an administrator of the machine and if i run the script as the system account the installer will install but not import the key into the users regisrty key.

How can i get around this in a single script? or can it be done in a single managed install?


0 Comments   [ + ] Show comments


All Answers


It can be done with an MI and a script in a task chain.

First the MI is running with local system credentials and then the script as Logged-in User.

To do both in one MI or one Script is posible but not such easy as a task chain rollout.

Answered 02/06/2020 by: Gerhart
Third Degree Blue Belt

  • Thats Sounds Great, Thanks.
    But how do i link the MI with the Script i a Task Chain?
    • 1. Create a MI with your .exe
      2. Create a Script with Windows Run as -> Logged-In User and your Regkey you will set
      3. Create an Task Chain with two Tasks -> first Task is your MI and Second Task is your Script.

      You dont have to link the MI and the Script directly. The Task Chain will run all Tasks sequential
      • Thanks, however im stuck on creating the Task Sequence. I created the task Sequence and the first task is a MI (although it does not say which MI) and the second task is the script. However it can not find the script i created , i type in the name or copy the script name into the field and it says script not found.
    • if your script is not present in Task chain then maybe the script is not "enabled". Only enabled Scripts will show up in Task chain
      • The Script is Enabled and is a Online Kscript. i cant see whats the difference between this and another that is there present in the Task Chain
      • I have now changed the Script to run a batch file and now its being seen in the Task Squence, however how does it know what MI to run ?
    • I do not understand the question. In Task 1 the program is carried out via the MI. Task 2 then executes the script which enters the corresponding RegKey for the program (which was installed in step 1) into the registry.
      • i cant see in Task 1 where you specify the MI
      • Also where are any logs resided for this task chan?

Try to make an active setup for your application :


Answered 02/06/2020 by: gwir
Brown Belt


In these cases I generally employ a script that will load the required key into all of the current profiles on the machine, as well as the default user profile. Here is an example:

@echo off
rem This script will turn off the PowerPoint 2013 Presenter Mode Setting for all users
echo Updating default user profile
reg load HKU\Def c:\users\default\ntuser.dat
regedit /s settings.reg
reg unload HKU\Def
for /D %%u in (\Users\*) do (
echo Updating options for %%u
reg load HKU\Def %%u\ntuser.dat
regedit /s settings.reg
reg unload HKU\Def
echo All Done here

The script loads the registry hives as HKEY_USERS\Def so the settings.reg file needs to have the registry keys formatted to load to that key, e.g.:


This would be part of a script that installs the application and the loads in the registry keys. If using a MI I would set it to run with user logged out, otherwise the registry hive for the logged in user might fail to load.

Answered 02/06/2020 by: chucksteel
Red Belt

Don't be a Stranger!

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

Sign up! or login


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