/build/static/layout/Breadcrumb_cap_w.png

Script not running at check-in

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


0 Comments   [ + ] Show comments

Answers (4)

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
Posted by: dugullett 12 years ago
Red Belt
3

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.


Comments:
  • Wouldn't this make it run every 2 hours in my case? I only want it ran once. - sfigg 12 years ago
    • 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. - dugullett 12 years ago
  • Thank you - this works well! - sfigg 12 years ago
Posted by: piyushnasa 12 years ago
Red Belt
2

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.

http://msiworld.blogspot.com.au/2012/07/vbscript-to-find-and-replace.html

Posted by: SMal.tmcc 12 years ago
Red Belt
0

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"


Comments:
  • 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. - sfigg 12 years ago
  • see new answer could not post screen shot here - SMal.tmcc 12 years ago
Posted by: SMal.tmcc 12 years ago
Red Belt
0

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


Comments:
  • 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. - dugullett 12 years ago
  • Yea we are lucky we have GPO's inplace that force a nightly shutdown of the normal users, - SMal.tmcc 12 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