Sending client machine files using Snap-Ins



  • My organization is transferring from an old instance of Norton Ghost to FOG, and are currently in the process of porting old Ghost “Tasks” to FOG Snap-Ins. A lot of our “Tasks” simply transfer a individual file from the Ghost instance to a specific directory on the client machine. When looking into Snap-Ins I do not see a transfer file option and upon attempting to send a file, the file is deleted after the script has completed. Is there a preferred method for doing this using the Snap-Ins or a setting/checkbox I am missing?


  • Moderator

    @zacadams As long as the fog client is installed, you don’t need access to any domain. I was only commenting if you need to pull files from somewhere else. The self contained snapin packs are a much cleaner solution anyway.



  • @joe-schmitt Thank you for the quick response, I will start experimenting with Snap-In packs



  • @george1421 Thank you for the response this looks like it should work. The other issue with our system is our batch or machines are not allowed on the domain so all work must be done locally.


  • Moderator

    @zacadams You can create a snapin pack (think zip file). That snapin pack will contain a batch file (to do the moves on the system locally) and the target file you want to install.

    To do this your snap in pack will contain the file you want to move and a batch file similar to below.

    Rem copy this file to that
    copy "%~dp0\File_to_move.txt" "c:\Windows"
    

    The thing you have to remember is that the snapins run as the local account SYSTEM. This account has no domain rights. If you need to reach out of the target system for a file, you will need to use this drive mapping command to connect as a user.

    net use t: \\server\filepath /user:domain\user password
    

    Understand there are risks with leaving a plain text password in your batch file. Bundling the file to move it a much cleaner and secure path to use. But either way does work.


  • Senior Developer

    @zacadams there is no native option, but it can still be done easily using SnapinPacks. Basically SnapinPacks let you “bundle” multiple files together.

    Lets say you wanted to save a file FileToSave.exe. You’d create a pack that looked like:

    --> copy.bat
    --> FileToSave.exe
    

    copy.bat would be the script you tell FOG to run, and it’d simply copy the FileToSave.exe, which is in the same directory, to wherever you want on the machine.

    wiki: https://wiki.fogproject.org/wiki/index.php?title=SnapinPacks

    Note: You can use %~dp0 in batch scripts to get the script’s directory. This way you can avoid hard-coding paths.


 

425
Online

41.8k
Users

12.3k
Topics

116.0k
Posts