I have a smart label that identifies a specific directory exists and have it applied to my script to remove it if the label finds the directory is there.  The problem is the script will only run once on the same computer even if the statment becomes true again.  I want it to always run when the computer is identified in the smart label even when it is on the same computer. I do not want the script to run on a schedule only when the smart label identifies the computer that has the directory created.

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

2

Once the system uploads an inventory, that should update at least the label results, if not the script.

You can test it by running inventory from a test system that has the software installed by going to this location in a command prompt:

cd c:\program files\dell\kace\

Then run: runkbot 4 0

From here, the system should be in the label. Run the script against the test system.

Run runkbot 4 0 again. The system should no longer be in the label.

Install the software and then runkbot 4 0 again. That should put it back in the label, then run the script again. It should identify the test system again.

If you don't find that to be the case, I'd open a support ticket and see if more light can be shed on the subject.

Answered 09/12/2012 by: jknox
Red Belt

  • Thanks for the advice and I have opened a ticket with KACE. I can set the script to run on a schedule but would prefer not too. It works anytime it is ran manually.
Please log in to comment
2

I'm not sure how you are currently deploying, but it sounds like you need to use Kscripting. I would also think that doing it this way you would not need the label. You can run this on all machines, so that if that dir ever shows it will remove it. You can set this to run every few hours.

Verify: Directory Exists

C:\program files\directory

On Success: Log Message

Dir does not exist.

Remediation: Run batch file

rd "C:\program files\directory" /S /Q

Remediation Success: Log Message

Dir Removed.

Remediation Failure: Log Message

Dir not removed.

Answered 09/13/2012 by: dugullett
Red Belt

  • Thanks for the advice and I have opened a ticket with KACE. I can set the script to run on a schedule but would prefer not too. It works anytime it is ran manually or on a scheudle. The label is needed so that it does not run on all systems and list a spefic mi after it is deployed via software distribution. Thanks again!
Please log in to comment
Answer this question or Comment on this question for clarity