/build/static/layout/Breadcrumb_cap_w.png

Single script on managed install

Hello


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?

Thanks





0 Comments   [ + ] Show comments

Answers (3)

Posted by: Gerhart 4 years ago
Green Belt
0

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.


Comments:
  • Thats Sounds Great, Thanks.
    But how do i link the MI with the Script i a Task Chain? - markc0 4 years ago
    • 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 - Gerhart 4 years ago
      • 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. - markc0 4 years ago
    • 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 - Gerhart 4 years ago
      • 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 - markc0 4 years ago
      • 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 ? - markc0 4 years ago
    • 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. - Gerhart 4 years ago
      • i cant see in Task 1 where you specify the MI - markc0 4 years ago
      • Also where are any logs resided for this task chan? - markc0 4 years ago
Posted by: gwir 4 years ago
Second Degree Brown Belt
0

Try to make an active setup for your application :

https://helgeklein.com/blog/2010/04/active-setup-explained/

Posted by: chucksteel 4 years ago
Red Belt
0

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

HKEY_USERS\Def\...

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.

 
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