/build/static/layout/Breadcrumb_cap_w.png

K1000 Script test for not logged in user

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

Answers (2)

Posted by: petelanglois 10 years ago
4th Degree Black Belt
0

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

Posted by: easterdaymatt 10 years ago
7th Degree Black Belt
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.


Comments:
  • 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 - easterdaymatt 10 years ago
  • 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? - jfindley 10 years ago
    • 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 - easterdaymatt 10 years ago
      • 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. - jfindley 10 years ago
    • 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. - easterdaymatt 10 years ago
 
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