After installation of Secure Checkpoint client i have to replace the file "user.c" with another one i have on a share map on a server on a domain.

How can i replace this file in K1000 with a scripting?

Answer Summary:
0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


Something like this would work. You can also use reg keys for your verify command. This ensures that the script will only run on the machine if "dummy.txt" does not exist. The remediation would be to copy that file, plus your user file.

Make sure to upload both files as dependencies.


Answered 07/25/2012 by: dugullett
Red Belt

  • thank you very much for your replay
    • I'm not sure how you are currently installing the software, or if you can create a transform. You can always include you "msiexec /i software.msi /q" at the top of this batch. That way you will not have multiple scripts for one piece of software.
  • I forgot to mension that the file that needs to be replaced is on a share on a computer in a domain and the place where the file needs to be copied is on a tablet in workgroup so i need also the account credential to access the share map.
    • You can use the net use command to map a share. If you do upload the file as a dependency to the Kbox then it is basically the same thing. I would copy the file from the share and paste somewhere local to your machine. From there upload it as a dependency.

      The tablet being in a workgroup will not matter as long as it has the Kace agent.
Please log in to comment



You can write a VBScript which will perform the following task to do this activity

1. Delete the existing old user.c file

2. Copy the new user.c file

Option Explicit
'On Error Resume Next
Dim objFSO, FileName, SourceLocation, DestLocation
Const OverwriteExisting = True

SourceLocation = "C:\Source"
DestLocation = "C:\Dest"
FileName = "user.c"

Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FileExists (SourceLocation & "\" & FileName) Then

 If objFSO.FolderExists (DestLocation) Then

  If objFSO.FileExists (DestLocation & "\" & FileName) Then
  objFSO.DeleteFile(DestLocation & "\" & FileName)
  objFSO.CopyFile SourceLocation & "\" & FileName , DestLocation & "\", OverwriteExisting 
  End If

 End If

End If
Set objFSO = Nothing

Answered 07/25/2012 by: jagadeish
Red Belt

Please log in to comment

You can use a Powershell script as well to copy a file.

Answered 07/26/2012 by: piyushnasa
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity