Script wont run if no user logged in
Hi all,
I am new in this forum, hope get some insights from some that has experienced the following.
I am trying to run a script that includes a registry key via Batch file. The script needs to run as the looged in user. When the user logged in, the script works like a charm. However if the user is logged off, the script just fails, even though I checked the box to "Run at next connection if off line."
The XML file i believe should do the job, but it fails as well.
<execute disconnected="false" logged_off="false">
I would imagine that Kace would wait until next logon to run the script. But it actually does not happen.
Does anyone have a solution for it?
Answers (1)
That may be a bug. I think the "run on next connection if offline" is running when you connect not login. That setting is assuming you are running as system and just does it when the machines starts since system is logged in. If you look at the xml it does not change when you change the run as.
You uncheck both boxes and run as a scheduled job so it repeats on a schedule ( I use a cron that only runs during working hours for my repeators.
Either:
Create a smart label that finds the machines without the reg key change so as they get pushed the change and inventory updates they fall off the label
or
verify task - see if the key exists
if not remediate and set the key
Comments:
-
I know this was posted 4 years ago but here we are 4 years later and there still is not a good solution. KACE has the ability to say "run on next connection if offline." Why is there NOT an option to say "wait for user to logon" so that a script can be pushed to a large number of computers without worrying about which ones may not have a user logged in. In my case, there isn't a good way to verify if the script should run, I have to select "always fail." I don't want to schedule to run repeatedly as that may negatively impact someone who has already had the script run. While I understand the workarounds, I've used them many times myself, this would be simplified with a simple check-box. - swalker804 5 months ago