cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hasayeret
Engaged Sweeper II
Hi guys,

I'm trying to copy files from the local C drive where my lansweeer is sitting to a c drive on a remote computer/
I'm using the following command:

copy /Y c:\or\redemption.dll c:\or\

"or" is the name of the folder where the file is in the server
I'd like it to copy to a folder called "or" in the C drive of whatever computer I'm choosing from the list. The OR folder on the destination computer does not exist so I need Lansweeper to create it for me.

I keep getting "incorrect function" when I run it. I'm using the system account who is also our domain admin

Thoughts?
10 REPLIES 10
Bruce_B
Lansweeper Alumni
You could use a Robocopy command using the deployment module. Do note that this command seems to return a 1 on success, so do adjust your success codes accordingly.

If the command works locally on a client computer in CMD (referring to your package share though), it should work using the deployment module.
StevenD
Engaged Sweeper II
Bruce.B wrote:
Do note that this command seems to return a 1 on success, so do adjust your success codes accordingly.


You saved my sanity. From the future, I thank you!
GarryP
Engaged Sweeper
The easiest way I have found to deploy files is by creating a silent self extracting .exe via WinRAR and define paths to extract, overwrite/update, etc. . . . I can create "FolderA" with any arrangement of subfolders and files and create a silent self-extracting .exe and set the absolute path for extraction to (for example) C:\Users\Public\Desktop\ and it works perfect every time. With WinRAR you can define a myriad of setting including "Save file security" "Extract and replace" "Extract and update" "Fresh existing files only".
zberkshier91
Engaged Sweeper II
Thanks so much!
I guess I needed to be more clear: I have 2 DLLs I need to copy from a shared location on a fileserver to each computer's C drive (I'm planning to create a folder in the c drive called "or")
Any chance you can walk me through the copying steps?

Thanks!


Unfortunately, VB scripting isn't my thing either. The information I was able to get was from a really quick google search, but I imagine if you had all of your files included in a folder, you could include a wild card like *.dll which should move anything ending in .dll over.

Sorry I couldn't be much help from there 😕
zberkshier91 wrote:
Thanks so much!
I guess I needed to be more clear: I have 2 DLLs I need to copy from a shared location on a fileserver to each computer's C drive (I'm planning to create a folder in the c drive called "or")
Any chance you can walk me through the copying steps?

Thanks!


Unfortunately, VB scripting isn't my thing either. The information I was able to get was from a really quick google search, but I imagine if you had all of your files included in a folder, you could include a wild card like *.dll which should move anything ending in .dll over.

Sorry I couldn't be much help from there 😕


No problem! really appreciate your help!
Anybody else can help by any chance?
Basically trying to create a deployment package to deploy 1 folder from a shared location on a fileserver to a bunch of computers.

Thanks!

No problem! really appreciate your help!
Anybody else can help by any chance?
Basically trying to create a deployment package to deploy 1 folder from a shared location on a fileserver to a bunch of computers.

Thanks!



Checked again at a few guides, in a test script, try changing "FSO.CopyFile" to "FSO.CopyFolder"
zberkshier91
Engaged Sweeper II
Absolutely!

In this example, I'm copying down the master_preferences file for Google Chrome (alternative to GPOs) to the client workstation after the install is finished. Here's what the deployment package overview looks like

Step 1 uninstalls Chrome using the MSI uninstaller type in your package settings. Under the "Version" field, I've left blank to act as a catch all for chrome versions.

Step 2 installs the MSI for 64 bit Google Chrome silently, without rebooting or any GUIs.

Step 3 is basically a fail safe in the event that a reboot occurs after the installation (happened once) it will stop it

Step 4 finished out the package by running the VBscript on the local workstation. Here is how I've structured out the folder so the file get's copied properly

In the script example, change the destination of the file to point to wherever you have it stored on your Lansweeper server, and in the destination, you'll need to include the location. Since it sounds like you need to have that directory created, you may need to tweak with the script to include a command to make a new directory on the client PC.

My thought would probably have that be a step that runs before the script does (most likely by including a command step to make a new directory. Google how to do this via cmd)

Hope all of this helps!
zberkshier91 wrote:
Absolutely!

In this example, I'm copying down the master_preferences file for Google Chrome (alternative to GPOs) to the client workstation after the install is finished. Here's what the deployment package overview looks like

Step 1 uninstalls Chrome using the MSI uninstaller type in your package settings. Under the "Version" field, I've left blank to act as a catch all for chrome versions.

Step 2 installs the MSI for 64 bit Google Chrome silently, without rebooting or any GUIs.

Step 3 is basically a fail safe in the event that a reboot occurs after the installation (happened once) it will stop it

Step 4 finished out the package by running the VBscript on the local workstation. Here is how I've structured out the folder so the file get's copied properly

In the script example, change the destination of the file to point to wherever you have it stored on your Lansweeper server, and in the destination, you'll need to include the location. Since it sounds like you need to have that directory created, you may need to tweak with the script to include a command to make a new directory on the client PC.

My thought would probably have that be a step that runs before the script does (most likely by including a command step to make a new directory. Google how to do this via cmd)

Hope all of this helps!


Thanks so much!
I guess I needed to be more clear: I have 2 DLLs I need to copy from a shared location on a fileserver to each computer's C drive (I'm planning to create a folder in the c drive called "or")
Any chance you can walk me through the copying steps?

Thanks!
zberkshier91
Engaged Sweeper II
I ran into a similar need not too long ago trying to push new files from my package share to the client PC.

I ended up finding a VB script that so far has worked really well.

Dim fso
Const OverwriteExisting = True
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "\\SERVERNAME\defaultpackageshare$\Scripts\Google files\master_preferences", "C:\Program Files (x86)\Google\Chrome\Application\master_preferences", OverwriteExisting