Offline Kscript not running at user log on
I have an offline KScript set to run at user log on, however it does not. Actually no scripts run at log on. I am waiting to hear back from Dell level 3 support on this but i don't expect any great news. The script runs if you do run now but not at log on. I will attach pictures as it will be easier to you all to see.
In the klogs and cache in Programdata/Dell there are no errors associated with the script running at log on...it just doesn't seem to run.
Any ideas?
Here is my XML text:
<?xml version="1.0" encoding="utf-8" ?>
<kbots xmlns="http://kace.com/Kbots.xsd">
<kbot>
<config name="DELL KACE SUPPORT SCRIPT " type="policy" id="183" version="1357157091" description="Registry File (Created by KACE Registry Settings Configurator)">
<execute disconnected="false" logged_off="false">
<event name="LOGON" />
</execute>
</config>
<compliance>
<verify on_failure="break" attempts="2">
<registry_key_exists key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" />
<registry_value_is key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LastLoggedLibrary" expectedValue=" " />
<registry_value_is key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LastConnectedServer" expectedValue=" " />
<registry_value_is key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="Username" expectedValue=" " />
<registry_value_is key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LoginMode" expectedValue="0x00000000" />
<registry_value_is key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="PrimaryLibrary" expectedValue=" " />
<registry_value_is key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LoginLibrary" expectedValue=" " />
<on_verify_success>
</on_verify_success>
<on_verify_failure>
<set_registry_key key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" />
<set_registry_value key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LastLoggedLibrary" type="REG_SZ" newValue="JAXLIB" />
<set_registry_value key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LastConnectedServer" type="REG_SZ" newValue=" " />
<set_registry_value key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="Username" type="REG_SZ" newValue=" " />
<set_registry_value key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LoginMode" type="REG_DWORD" newValue="0x00000000" />
<set_registry_value key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="PrimaryLibrary" type="REG_SZ" newValue="JAXLIB" />
<set_registry_value key="HKEY_CURRENT_USER\Software\Hummingbird\PowerDOCS\Core\Plugins\Fusion\Login" name="LoginLibrary" type="REG_SZ" newValue="JAXLsdfdsfsdfdsfdsfs" />
<on_remediation_success>
</on_remediation_success>
<on_remediation_failure>
</on_remediation_failure>
</on_verify_failure>
</verify>
</compliance>
</kbot>
Answers (4)
You need to run this as an online since your verifies all are hkcu and hkcu does not exist till you are logged in.
Comments:
-
The logic flow of the script is
step 1
Does it meet the requirements in the configuration area? Yes go to 2 No quit
step 2
Does it meet OS requirements? Yes go to 3 No quit
step 3
What is the schedule?
if Don't .... quit
if any other radial button are there any options? (the square boxes)
does the schedule "OR" any options apply? Yes go to 4 No quit
(note the square boxes do not work without a schedule)
step 4 Run the task.
this is where is gets tricky since it is offline you cannot verify against any user reference varibles or reg keys they do not exist till login.
You need a verify that is unique or else it will run every time that conditions in steps 1 thru 3 are met. - SMal.tmcc 11 years ago -
Thanks for that reply!
Here is the problem with an online script for my enviornment: This is an update to an add-in for word and word and the addin process have to be off in order for the changes the script makes to take effect. I could run an online script to kill word.exe and dm.exe (our add in) but that returns a critical error message when you boot word back up saying it didn't shut down correctly.
We are trying to make this as painles as possible for our users. I work in a large law firm so we like things to be very simple for them so running it as log on makes sure word and dm are not started. However, i am going to try your suggestion above and see what i can come up with! - areiner 11 years ago-
are all these machines in a domain? - SMal.tmcc 11 years ago
-
Yes - areiner 11 years ago
-
push those out via a GPO or in the users login script. It is only reg pokes little over head on the login process.
You can create a custom software inventory item on the k1000 that monitors that key value and then when all the users show the proper key turn it off
We use Kix scripts from http://www.kixtart.org/ to enhance/automate our login scripts
this is the regitryfix.kix script that runs at login for us currenlty
;For adding Registry entries into workstations
; Reg entry for fixing IE not refreshing web pages as in Groupwise Web Mail
writevalue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "SyncMode5", "4", "REG_DWORD") - SMal.tmcc 11 years ago
-
great, about to download kix and ill post back here! - areiner 11 years ago
What value is set for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit? We include the AMPAgent in our image but sysprep was removing the KUsrInit.exe value from this key. If the value is set back to the standard Windows userinit.exe then the KACE login scripts will not run.
Comments:
-
C:\Windows\System32\KUsrInit.exe, - areiner 11 years ago
you need to choose one of the radial buttons to "run as" then the "also" applies
Comments:
-
I can't do run as in offline kscript - areiner 11 years ago
-
tell it to run the 1st of every month and "also" at user login which should trigger it at login by logic. - SMal.tmcc 11 years ago
-
That still doesn't work unfortunately. - areiner 11 years ago
-
it may have worked but it never meet the verify condition. The hive HKCU is created at log in not before. - SMal.tmcc 11 years ago