I am running a script which requires a reboot at the end. I want to run this against workstations that do not have a user currently logged in. I can't find a way to do this using either a Smart Label or in the Verify section of the script.

JF

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

For offline script you just select the box allow to run when user is logged off.

Answered 09/26/2013 by: petelanglois
Fourth Degree Black Belt

Please log in to comment
0

I haven't seen the ability to explicitly tell the K1000 to make sure the user is logged off before run (unless you script that), but the Managed Install can run "Execute While User is Logged Off". Without more specifics on your script I can't give you advice on how you would have to set that up though...

 

FYI

In offline scripts, if you specifiy "Allow to run while logged off", you will still get machines that have users logged on when it tries to run. When the scheduled time happens, or when you press "Run Now", any machine that is targeted will be hit and both logged on and logged off machines will be affected.

Answered 09/26/2013 by: easterdaymatt
Seventh Degree Black Belt

  • Just found a helpful post back from 2011 with a good idea...

    Verify the process explorer.exe is not running.

    and only execute the script if that is true.

    - See more at: http://www.itninja.com/question/set-a-script-to-only-run-while-logged-off#sthash.Pv7N9p2u.dpuf
  • Yes, "Allow Run While Logged Off" works for logged off computers, but also on computers where users are logged in.

    I specifically want to only deploy this against computers that are logged off (but obviously powered on).

    My script is to install the new Windows Installer 4.5 on XP and it requires a reboot. I do not want to reboot computers if a user is logged on.

    My script is very simple:

    Task 1 > On Success > Launch a program

    Directory: \\server\path
    File: new-msiexec-installer.exe
    Parameters: /quiet

    That's all. Any other ideas?
    • First step: Don't use scripting for this. You're making it harder on yourself.

      I would install the Windows Installer 4.5 on a test XP machine manually (Unless it's already on at least one machine and in inventory) and then find the Software Inventory record and associate the MSI with that. Then create a managed install with "Managed Action: While User Logged Off".

      For more detailed instructions on what I mean check out this guide: http://www.itninja.com/blog/view/mastering-managed-installs

      If you haven't had any Managed Install experience yet, check out this KKE on the subject:
      https://kace.webex.com/kace/lsr.php?AT=pb&SP=TC&rID=64372787&rKey=c5b1faa279a1a57f&act=pb
      • The problem is MSFT and lack of support for XP. There is no MSI, and it isn't installed software in the sense that other software is.

        I have to check the version by checking the file version of msi.dll - which works fine.

        But there is no way (that I've found) to do this as a managed install.
    • Excellent point about it being not installed traditionally...BUT it just hit me...Installer 4.5 is a patch...so search your patch listing (By all years) for KB942288 and then have it install over night. You can then prompt users for the reboot if they are using their PC at night and they can Snooze the reboot. This won't be super duper silent, but it should get you where you want to be without major inconvenience to the end user.
Please log in to comment
Answer this question or Comment on this question for clarity