Copy files to all domain connected users
kent,
I think is something I´m doing wrong when creating my pack look the steps I done.
1- I used your scritp and saved it as vbs file correct.
The script is like this now:
Dim objFSO,ObjNet
Dim strUsername,strDestfile, strScriptLocation
strFileName = "fxdecod1.dll"
strScriptLocation = Replace(WScript.ScriptFullName,WScript.ScriptName,"")
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strAppData = objShell.ExpandEnvironmentStrings("%programfiles%")
strDestFolder = strAppData & "\foxit software\foxit reader"
If Not objFSO.FolderExists(strDestFolder) Then
objFSO.CreateFolder strDestFolder
End If
objFSO.Copyfile strScriptLocation & strFileName,strDestFolder&"\",True
2- I created the pack with both files the dll and script and I selected this package has source files and selected the folder where the files are.
3- Send to DP
4- I created the program at the progra on commandline I´ve only select the script file, i did not put any command, is this correct?
5- I created an advertisement to the pilot collection to test and did no work too.
When i look at the execmgr.log on the clients I´m getting the this error msg: failed with exit code 4
Thanks for helping!!!
Rodrigo Daphanis
July 27th, 2011 9:48am
try using cscript.exe <vbs file name> and run it manually to check of that works.
Thanks, Vamsi
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2011 10:24am
Yes,
Using cscript.exe <vbs file name> and running manually it works perfect, but I´m trying to run it without user interaction do you know why it works manually and automatic no?
Thanks!!!Rodrigo Daphanis
July 27th, 2011 11:33am
when you run it MAnually, do you get any confirmation box like some echo.. or is it a silent.
Could you also confirm that the scriptyou run manually and the one you run as part of SCCM package are the same. Reason I am asking is.. I had a similar issue when I copied a different script from IE into a notepad it was not taking few characters properly
and due to which I got error 4 which mean the System cannot open the file. (because it was not able to find it in the right path)
Thanks, Vamsi
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2011 12:22pm
Vamsi,
After all morning trying to do, I got it.
The only thing I did different was to enable the the option "use custom countdown notification length 1 minute" then i tryed again and it worked well.
Thanks for helping.Rodrigo Daphanis
July 27th, 2011 1:26pm
Hi,
Today I tried in many ways copy one dll from sccm to all my workstations using batch and did not work.
Just to understand when i use batch on sccm should i create only one pack with the the batch and the file that i what to copy to the folder?
Another thing is when I´m creating the program to the pack the command line to run the bach do i need only to point the batch file or there is any additional command to run the batch.
Is there another way to copy the files or this is the best way to do that, and if anyone know any documentation that i could look to do that i would appreciate that.
Thanks!!!
Rodrigo Daphanis
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2011 10:07pm
Hello - Have you seen below threads and article? It would help you
http://www.myitforum.com/articles/1/view.asp?id=12036
http://social.technet.microsoft.com/Forums/en/configmgrswdist/thread/17c69d1d-6b91-47bf-85d5-e90e7c05169c
http://social.technet.microsoft.com/Forums/en/ITCG/thread/0fe62945-683f-4e0f-bf28-b27d4830831eAnoop C Nair - This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually
answer your question. This can be beneficial to other community members reading the thread.
July 27th, 2011 10:16pm
It all depends on the batch file. When I copy files I normally use a script like this and placing the file in the same pacakge as the script: The Script copies a file to %appdata%\Microsoft\Skabeloner
Dim objFSO,ObjNet
Dim strUsername,strDestfile, strScriptLocation
strFileName = "PlaceTheFileNameHere"
strScriptLocation = Replace(WScript.ScriptFullName,WScript.ScriptName,"")
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strAppData = objShell.ExpandEnvironmentStrings("%AppDATA%")
strDestFolder = strAppData & "\Microsoft\Skabeloner"
If Not objFSO.FolderExists(strDestFolder) Then
objFSO.CreateFolder strDestFolder
End If
objFSO.Copyfile strScriptLocation & strFileName,strDestFolder&"\",True
Kent Agerlund | My blogs: http://blog.coretech.dk/author/kea/ and http://scug.dk/ | Twitter @Agerlund | Linkedin: /kentagerlund
Free Windows Admin Tool Kit Click here and download it now
July 28th, 2011 1:25am


