Client Management Suite

 View Only
  • 1.  detection rule version check for text files

    Posted Sep 03, 2014 12:11 PM

    I need a way to check for a version of a text file, I can check if it exist but need way to check for change.  Need ideas.

    Basically I want to modify my software package to copy 3 text files for controlling Java settings to the machines.  I do this now but the settings files are on a network share.  The nice thing about this is I can easily modify the settings and all the clients are updated the issue is when a machine is offline it basically kills Java.  So I would like to put all these files locally on the machine but not lose my ability to keep these settings updated as I make changes.

    Any ideas?  I'm using software management (MSD) to copy the files to the pc's.



  • 2.  RE: detection rule version check for text files

    Posted Sep 03, 2014 01:32 PM

    If I understand your requirement, a simplistic way would be XCOPY.  With the /D parameter, xcopy will only copy the file if the date/time of the source file is newer than the target.

    Example:

    XCOPY \\server\share\JavaConfig\*.* C:\Windows\Sun\Java\Deployment /D /C /Y



  • 3.  RE: detection rule version check for text files

    Posted Sep 03, 2014 02:04 PM

    So remove the detection rule completely then?  The only issue I have with this is that it would copy everytime no matter what.



  • 4.  RE: detection rule version check for text files

    Posted Sep 03, 2014 02:05 PM

    I thought about possibly creating a batch that not only copies the files from the package but also writes a registry entry.  This way my detection rule could check for the registry entry.



  • 5.  RE: detection rule version check for text files
    Best Answer

    Posted Sep 03, 2014 03:23 PM

    I'd have an extra text file called MyCoJavaSettingsv1.txt.

    Then change the name of that file each time you change the settings files and detect for that file name. If you're really keen you can put release notes in there to remind yourself of what each change was,when and why.

    I don't like reg keys as much, too easy for the file copy to fail and the reg write to succeeed or vice versa.
     



  • 6.  RE: detection rule version check for text files

    Posted Sep 03, 2014 03:26 PM

    I like this idea.  I will keep this open till tomorrow for any other suggestions.



  • 7.  RE: detection rule version check for text files

    Posted Sep 16, 2014 10:17 AM

    with the parameters I provided, it would not copy every time, only when the source file has changed.