I have a batch file that basically renames a file - nothing complex. If I do a RUN NOW, it works. However, I have it set for offline mode, and I want it basically to run on a label of machines the next time they check in. I've tried "no schedule" with "allow once at next checkin" as well as trying " machine boot up" and "machine check in". I've forced an update. Doesn't work. 


Again, it works if I do a run now, but I don't want that. We basically have a file on the machines causing a memory leak, and we just want to rename it for now rather than remove it from the machine. I still can't figure out how to get this to run properly upon next check-in or comuter startup.


Any help is appreciated

Answer Summary:
Change it to an "online script" and set the schedule to run the same amount of hours your agent check in time is
0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



Change it to an "online script" and set the schedule to run the same amount of hours your agent check in time is. See if that works.

Answered 07/25/2012 by: dugullett
Red Belt

  • Wouldn't this make it run every 2 hours in my case? I only want it ran once.
    • Take a look at my answer here http://www.itninja.com/question/how-to-replace-a-file-with-scripting-on-k1000 You can modify it for what you need.

      In your existing batch file add something that Kace can see. That way on the "verify" step it will see that it has already been ran, and will not run again.
  • Thank you - this works well!
Please log in to comment
Answer this question or Comment on this question for clarity



Have you tried VBScript for this.

Use  objFSO.MoveFile command to replace the file.

I have written a script for find and replace in VBSCript which has a small function of renaming file.

You can have a look here.


Answered 07/25/2012 by: piyushnasa
Red Belt

Please log in to comment

create a push with condition if file exists

reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v renamefile /d "rename c:\windows\badfile.exe badfile.exeold"

Answered 07/24/2012 by: SMal.tmcc
Red Belt

  • What do I put in the 'directory' field, and what in the 'file' field? It seems weird to me to use a verify file with a reg.exe command? I'm a bit confused.
  • see new answer could not post screen shot here
Please log in to comment

on the kace1000 go the scripts tab, create an online script, tell it the machines you want and create this task

Answered 07/25/2012 by: SMal.tmcc
Red Belt

  • The only drawback to doing it this way is waiting on the users to reboot. I have users that haven't shutdown in a month.
  • Yea we are lucky we have GPO's inplace that force a nightly shutdown of the normal users,
Please log in to comment