Irfansj Posted January 7, 2013 Report post Posted January 7, 2013 Hello, I have struggling hard to create a simple package using a batch file. Probably if some one can help I need to copy DLL file to c:\windows\system32 directory on all managed clients. Also I need to run .reg file on all client workstations which will create keys in the registry. Action I took: I created a batch file using copy \\ServerName\.... c:\windows\system32 regedit /S \\Servername\path\register.reg I than go up and create a standard program from the Package --> New Package wizard. However i am unable to copy these files to system32 directory. Is there a different way to create such packages?? Where should i search for error logs on client side ?? Quote Share this post Link to post Share on other sites More sharing options...
0 Rocket Man Posted January 7, 2013 Report post Posted January 7, 2013 Have a package with your files in it and a batch file also: The syntax so it deploys from the DP ---------------------------------------------------------------------------------- @Ehco copy %~dp0filename1.extension "c:\windows\system32" copy %~dp0filename2.extension "c:\windows\system32" copy %~dp0filename3.extension "c:\windows\system32" copy %~dp0filename4.extension "c:\windows\system32" copy %~dp0filename5.extension "c:\windows\system32" regedit.exe /s regkeys.reg @Exit --------------------------------------------------------------------------- your rekeys.reg would have to be taken from a machine with the app installed!! Put all the keys into one AKA regkeys.reg Rocket Man Quote Share this post Link to post Share on other sites More sharing options...
0 Irfansj Posted January 8, 2013 Report post Posted January 8, 2013 Hello Rocket Man, Not sure, if i have understood correctly, requesting to confirm steps below. Step1. I created a batch file : DLL.bat (with exactly the same contents as below) @Ehco copy %~dp0passwordreset.dll "c:\windows\system32" copy %~dp0msvcrt100.dll "c:\windows\system32" regedit.exe /s regkeys.reg @Exit My doubt in step1. Doubt1 should i use the commandline regedit.exe /s regkeys.reg in the batch file OR I need to replace with my actual registry files as below regedit.exe /s unregister.reg regedit.exe /s unregister.reg Doubt2 should i use the inverted commas as "c:\windows\system32" OR c:\windows\system32 Step2: I copied this batch file, passwordreset.dll, msvcrt100.dll , unregister.reg and register.reg inside \\sccmsrv\software\dll folder. The software folder is shared for everyone Step3: I create a package using below steps Package --> create package --> The package contains source files (pointed to the \\sccmsrv\software\dll\ ) folder. Selected "Do not create a Program". This only created a package. Step4 I then distributed it to DP's via "Distribute Content" Step5 I than apply to collections. Regards Irfan Quote Share this post Link to post Share on other sites More sharing options...
0 Irfansj Posted January 8, 2013 Report post Posted January 8, 2013 Step3: Correction I create a package Package --> Create Package --> The package contains source files (pointed to the \\sccmsrv\software\dll\ ) folder. Select "Create a Standard Program" Quote Share this post Link to post Share on other sites More sharing options...
0 Irfansj Posted January 8, 2013 Report post Posted January 8, 2013 Hi Rocket Man, Updates: I was able to copy the 2 Dll files. However it didnot get copied to c:\windows\system32. It copied to C:\Windows\SysWoW64 . I am running hardware x64 with win7 x64 editions. The registry also didnot execute. Quote Share this post Link to post Share on other sites More sharing options...
0 Rocket Man Posted January 8, 2013 Report post Posted January 8, 2013 The registry should execute if you have all the registry enteries in the one registry key called regedit.reg, if all keys are specified in this and where to add to the registery it should work!! Works well for me on a specific piece of software!! As for your other problem .....well atleast the files are now copying to the local machine, unfortunately I can give you no more assistance on this area as I only run x86 clients so have no idea as to why they are copying to the sysWOW64 folder?? Maybe some one else knows and would like to contribute? Rocket Man Quote Share this post Link to post Share on other sites More sharing options...
0 Irfansj Posted January 9, 2013 Report post Posted January 9, 2013 Thanks RocketMan, Yes you are absolutely right. The registry also got executed but it got executed in HKLM--> software --> WOW6432 node --> Microsoft --> windows --> ..... instead of HKLM --> software --> Microsoft. Thanks for your help. If i am able to resolve this , i will definately update you.. Thanks once again for your great support. Regards Quote Share this post Link to post Share on other sites More sharing options...
0 Peter33 Posted January 29, 2013 Report post Posted January 29, 2013 Instead of regedit.exe /s regkeys.reg use reg import regkeys.reg /reg:64 1 Quote Share this post Link to post Share on other sites More sharing options...
Hello,
I have struggling hard to create a simple package using a batch file. Probably if some one can help
I need to copy DLL file to c:\windows\system32 directory on all managed clients. Also
I need to run .reg file on all client workstations which will create keys in the registry.
Action I took:
I created a batch file using
copy \\ServerName\.... c:\windows\system32
regedit /S \\Servername\path\register.reg
I than go up and create a standard program from the Package --> New Package wizard.
However i am unable to copy these files to system32 directory.
Is there a different way to create such packages??
Where should i search for error logs on client side ??
Share this post
Link to post
Share on other sites