اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

سؤال عن : نسخ ملف dll من مسار محدد الى المسار C:\Windows\System32


ابو جودي
إذهب إلى أفضل إجابة Solved by ابو جودي,

الردود الموصى بها

السلام عليكم ورحمة الله تعالى وبركاته

أساتذتي الكرام ... تحية طيبة عطرة

اريد نسخ ملف dll  من مسار محدد الى المسار C:\Windows\System32

 

 

رابط هذا التعليق
شارك

للعلم جربت من خلال الاكواد الى اعرفها ولكن يبدو لانه مجلد نظام لم يقبل 

فهل من طريقة او الية لعمل  Copy File By Force

 

رابط هذا التعليق
شارك

عليكم السلام  اباجودي ورحمة الله وبركاته

انا استخدم  ملف بات للنسخ والتسجيل 

انظر المرفق  وحول الامتداد الى bat

اضطر احيانا الى تخفيض امان وندوز خاصة 10 وما فوق

 

Cpyto32.rar

  • Like 1
رابط هذا التعليق
شارك

6 دقائق مضت, ابوخليل said:

عليكم السلام  اباجودي ورحمة الله وبركاته

انا استخدم  ملف بات للنسخ والتسجيل 

انظر المرفق  وحول الامتداد الى bat

اضطر احيانا الى تخفيض امان وندوز خاصة 10 وما فوق

معنى ذلك اخي الكريم احتاج تعديل الكود حسب الويندوز 32 او 64

هل نستطيع ان نجعل الاكسس يتعرف على نوع الويندوز ثم تلقائيا يقوم هو بنسخ الملف للسيستم حسب الويندوز ؟؟؟؟

بارك الله فيك ...

رابط هذا التعليق
شارك

9 دقائق مضت, ابوخليل said:

عليكم السلام  اباجودي ورحمة الله وبركاته

انا استخدم  ملف بات للنسخ والتسجيل 

انظر المرفق  وحول الامتداد الى bat

اضطر احيانا الى تخفيض امان وندوز خاصة 10 وما فوق

 

Cpyto32.rar 162 \u0628\u0627\u064a\u062a · 3 downloads

استاذى الجليل و معلمى القدير و والدى الحبيب الاستاذ @ابوخليل :fff:

يا لهنائي وسعادتي لمروركم الطيب ورؤيتكم فلقد اشتاقت نفسي اليكم كثيرا 

استأدى انا بالفل جربت تلك الطريقة 

ولكن لا يتم نقل الملفات

وبصراحة كنت اطمع في كود برمجي يتمم العملية في صمت دون ان يدرى المستخدم بأي شيء 

خطرت على بالى فكرة ولكن لا ادرى هل ممكنه ام لا 

هل يمكن وضع المرفقات فى ملف Zip   بجوار القاعدة ويتم فك الملف برمجيا فى المسار C:\Windows\System32   فى صمت دون ان يدرى المستخدم بأى شئ ؟

حتى اننى استخدمت الكود بتلك الطريقة لأجبره على نسخ الملفات ولكن دون جدوى

@ECHO OFF

xCOPY /Y /W   "D:\MyDll\zxing.interop.dll"  "C:\Windows\System32\zxing.interop.dll"


echo Copy Completed

 

رابط هذا التعليق
شارك

نعم يمكن

فعلا انا استخدم هذه الطريقة في تنصيب برامجي

ولكن عبر برنامج تحزيم 

عند التنصيب يقوم  بفك الملفات في المسار المحدد .. ثم يقوم هو بتشغيل ملفات البات

علما ان ملف البات يشتمل على اكواد لنسخ المكتبات داخل ملف النظام واكواد اخرى لتسجيل هذه الملفات

وكل هذا يعمل بصمت  ،، ويمكن اظهار نتيجة التسجيل في رسائل منبثقة

فيما يخص تسجيل المكتبات من واقع تجربة غالبا يتعين عليك تخفيض امان مستخدم وندوز  قبل التنصيب ،

منذ ساعه, ناقل said:

معنى ذلك اخي الكريم احتاج تعديل الكود حسب الويندوز 32 او 64

هل نستطيع ان نجعل الاكسس يتعرف على نوع الويندوز ثم تلقائيا يقوم هو بنسخ الملف للسيستم حسب الويندوز ؟؟؟؟

بارك الله فيك ...

صحيح انا استخدم  التعديل اليدوي

حيث اعمل من برنامجي نسختين واحدة 32 والاخرى 64

  • Like 2
رابط هذا التعليق
شارك

السلام عليكم أساتذي 

أنا استخدم هذه الطريقة وهي تعمل حتى مع الويندوز 10

تحياتي

@echo off
goto permissionCheck

:permissionCheck
    echo Checking permissions...

    SET adminRights=0
    FOR /F %%i IN ('WHOAMI /PRIV /NH') DO (
        IF "%%i"=="SeTakeOwnershipPrivilege" SET adminRights=1
    )

    IF %adminRights% == 1 (
        echo Elevated permissions confirmed.
        echo F| XCOPY C:\Source\Sami.dll C:\Windows\System32\Sami.dll
        pause >nul
    ) ELSE (
        echo Elevated permissions absent.
        echo.
        echo This file needs to be run as an Administrator.
        echo.
        echo Close this window, right-click on the file and click "Run as Administrator".
        echo   OR
        echo Log on to an Administrator account and run this file normally.
       
      
        pause >nul
    )

 

  • Thanks 1
رابط هذا التعليق
شارك

  • 5 weeks later...
  • أفضل إجابة

وحتى تعم الفائدة الحمد لله توصلت للاتى لكل من يهتم بعمل مثل تلك الباتشات

المميزات

  • العمل على كلتا النواتان للويندوز 32 , 64 بت
  • الشغيل حتى لو لم يتم تشغيل الملف كمسؤول يتم اغلاق الملف واعادة فتحه مره اخرى كمسؤول تلقائيا
  • نسخ الملفات حتى لو ارد المبرمج ان ينسخها الى ملفات النظام فى الويندوز
  • تسجيل المكتبات

يتم فقط وضع الملف فى مجلد المكتبات وتغيير اسمائها فى الكود تبعا لاسماء المكتبات :yes::wink2:

@echo off
CLS
:init
setlocal DisableDelayedExpansion
set cmdInvoke=1
set winSysFolder=System32
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
setlocal EnableDelayedExpansion
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
ECHO.
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
ECHO args = "ELEV " >> "%vbsGetPrivileges%"
ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
ECHO args = args ^& strArg ^& " "  >> "%vbsGetPrivileges%"
ECHO Next >> "%vbsGetPrivileges%"
if '%cmdInvoke%'=='1' goto InvokeCmd 
ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
goto ExecElevation
:InvokeCmd
ECHO args = "/c """ + "!batchPath!" + """ " + args >> "%vbsGetPrivileges%"
ECHO UAC.ShellExecute "%SystemRoot%\%winSysFolder%\cmd.exe", args, "", "runas", 1 >> "%vbsGetPrivileges%"
:ExecElevation
"%SystemRoot%\%winSysFolder%\WScript.exe" "%vbsGetPrivileges%" %*
exit /B
:gotPrivileges
setlocal & cd /d %~dp0
if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul  &  shift /1)

mode 95,40
color 0C
 
echo ---www.officena.net-------------------------------
echo ---Mohammes Essam---------------------------------

set location=%cd%

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT

echo MachineSecurityLevel2003.reg
echo UserSecurityLevel2003.reg

echo F| XCOPY %location%\DBPix20.ocx %SystemRoot%\System32\DBPix20.ocx /h /f /y
echo F| XCOPY %location%\barcodex.ocx %SystemRoot%\System32\barcodex.ocx /h /f /y

echo regsvr32 %SystemRoot%\System32\DBPix20.ocx
echo regsvr32 %SystemRoot%\System32\barcodex.ocx


if %OS%==64BIT echo MachineSecurityLevel2003.reg
if %OS%==64BIT echo UserSecurityLevel2003.reg

if %OS%==64BIT echo F| XCOPY %location%\DBPix20.ocx %SystemRoot%\syswow64\DBPix20.ocx /h /f /y
if %OS%==64BIT echo F| XCOPY %location%\barcodex.ocx %SystemRoot%\syswow64\barcodex.ocx /h /f /y

if %OS%==64BIT echo regsvr32 %SystemRoot%\syswow64\DBPix20.ocx
if %OS%==64BIT echo regsvr32 %SystemRoot%\syswow64\barcodex.ocx

pause

CLS
color 1E
echo "----------------------------------------------------------------------------------------";
echo Libraries copied and registered successfully
pause
@echo on

 

وتسهيلا على إخواني 

 

Xcopy Command Syntax

Use the following syntax for the xcopy command:

xcopy source [destination] [/a] [/b] [/c] [/d [:date]] [/e] [/f] [/g] [/h] [/i] [/j] [/k] [/l] [/m] [/n] [/o] [/p] [/q] [/r] [/s] [/t] [/u] [/v] [/w] [/x] [/y] [/-y] [/z] [/exclude:file1[+file2][+file3]...] [/?]

Xcopy Command Options
Item Description
source This defines the files or top level folder that you want to copy from. The source is the only required parameter. Use quotes around source if it contains spaces.
destination This option specifies the location where the source files or folders should be copied to. If no destination is listed, the files or folders will be copied to the same folder you run the xcopy command from. Use quotes around destination if it contains spaces.
/a Using this option will only copy archive files found in source. You can not use /a and /m together.
/b Use this option to copy the symbolic link itself instead of the link target. This option was first available in Windows Vista.
/c This option forces xcopy to continue even if it encounters an error.
/d [:date] Use the command with /d option and a specific date, in MM-DD-YYYY format, to copy files changed on or after that date. You can also use this option without specifying a specific date to copy only those files in source that are newer than the same files that already exist in destination. This is helpful when using xcopy to perform regular file backups.
/e When used alone or with /s, this option is the same as /s but will also create empty folders in destination that were also empty in source. The /e option can also be used together with the /t option to include empty directories and subdirectories found in source in the directory structure created in destination.
/f This option will display the full path and file name of both the source and destination files being copied.
/g Using xcopy with this option allows you to copy encrypted files in source to a destination that does not support encryption. This option will not work when copying files from an EFS encrypted drive to a non-EFS encrypted drive.
/h The command doesn't copy hidden files or system files by default but will when using this option.
/i Use the /i option to force xcopy to assume that destination is a directory. If you don't use this option, and you're copying from source that is a directory or group of files and copying to destination that doesn't exist, the xcopy command will prompt you enter whether destination is a file or directory.
/j This option copies files without buffering, a feature useful for very big files. This option was first available in Windows 7.
/k Use this option when copying read-only files to retain that file attribute in destination.
/l Use this option to show a list of the files and folders to be copied... but no copying is actually done. The /l option is useful if you're building a complicated command with several options and you'd like to see how it would function hypothetically.
/m This option is identical to the /a option but xcopy will turn off the archive attribute after copying the file. You can not use /m and /a together.
/n This option creates files and folders in destination using short file names. This option is only useful when you're using the command to copy files to a destination that exists on an drive formatted to an older file system like FAT that does not support long file names.
/o Retains ownership and Access Control List (ACL) information in the files written in destination.
/p When using this option, you'll be prompted before the creation of each file in destination.
/q A kind of opposite of the /f option, the /q switch will put xcopy into "quiet" mode, skipping the on-screen display of each file being copied.
/r Use this option to overwrite read-only files in destination. If you don't use this option when you want to overwrite a read-only file in destination, you'll be prompted with an "Access denied" message and the command will stop running.
/s Use this option to copy directories, subdirectories, and the files contained within them, in addition to the files in the root of source. Empty folders will not be recreated.
/t This option forces the xcopy command to create a directory structure in destination but not to copy any of the files. In other words, the folders and subfolders found in source will be created but there we be no files. Empty folders will not be created.
/u This option will only copy files in source that are already in destination.
/v This option verifies each file as it's written, based on its size, to make sure they're identical. Verification was built in to the command beginning in Windows XP, so this option does nothing in later versions of Windows and is only included for compatibility with older MS-DOS files.
/w Use the /w option to present a "Press any key when ready to being copying file(s)" message. The command will begin copying files as instructed after you confirm with a key press. This option is not the same as the /p option which asks for verification before each file copy.
/x This option copies file audit settings and System Access Control List (SACL) information. You imply /o when you use the /x option.
/y Use this option to stop the command from prompting you about overwriting files from source that already exist in destination.
/-y Use this option to force the command to prompt you about overwriting files. This might seem like a strange option to exist since this is the default behavior of xcopy but the /y option may be preset in the COPYCMD environment variable on some computers, making this option necessary.
/z This option allows the xcopy command to safely stop copying files when a network connection is lost and then resume copying from where it left off once the connection is reestablished. This option also shows the percentage copied for each file during the copy process.
/exclude:file1[+file2][+file3]... This option allows you to specify one or more file names containing a list of search strings you want the command to use to determine files and/or folders to skip when copying.
/? Use the help switch with xcopy to show detailed help about the command. Executing xcopy /? is the same as using the help command to execute help xcopy.

 

تم تعديل بواسطه ابو جودي
  • Thanks 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information