Get the App
SLTechnology News&Howtos  ›  Servers  › 

Powershell copies files to C:\ windows\ system32

Shulou Source: shulou.com Published: 2022-06-02 20:56:46 09月22日 Update

Writing a Powershell script encountered this problem, which wasted a lot of my time.

Since the windows system is divided into 32-bit and 64-bit, there is a difference when copying files to the system32 system directory

Direct copy command

Copy-Item-Force c:\ temp\ backgroundDefault.jpg c:\ windows\ system32\ oobe\ info\ backgrounds\

64-bit system files are copied to C:\ Windows\ SysWOW64\ oobe\ info\

To copy 64 bits to the system32 directory, you need to write c:\ windows\ sysnative\

* * Copy-Item-Force c:\ temp\ backgroundDefault.jpg c:\ windows\ sysnative\ oobe\ info\ backgrounds\ *

Https://social.technet.microsoft.com/Forums/office/en-US/2551af46-b974-4a19-b027-9c0ffe405aac/copy-file-to-cwindowssystem32-on-windows64?forum=winserverpowershell

Tags: Copy file directory system command time script question Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Technology NVidia Shulou Tech Info Apple