Computer Hope

Software => Computer programming => Topic started by: peacepuppy on July 26, 2010, 03:11:20 PM

Title: W7 Run Xcopy as administor
Post by: peacepuppy on July 26, 2010, 03:11:20 PM
Hello,

I have to move a file with windows 7 to the "system32" folder. but it dont work with copy.
Can some one help or tell mee what is do wrong?

What i have is:

Code: [Select]
ECHO OFF

xcopy "File.txt" "C:\windows\system32"

CLS
Title: Re: W7 Run Xcopy as administor
Post by: MrSelfDestruct on July 27, 2010, 06:16:04 AM
Well it is like you said, it has to run with admin rights.

Right click Command Prompt -> Run as administrator
Title: Re: W7 Run Xcopy as administor
Post by: peacepuppy on July 27, 2010, 09:08:18 AM
That doesn't work, i already tried that.
Title: Re: W7 Run Xcopy as administor
Post by: jason2074 on July 27, 2010, 09:24:32 AM
Have you tried going into safemode?
http://www.howtogeek.com/howto/windows-vista/how-to-delete-a-system-file-in-windows-vista/  
Title: Re: W7 Run Xcopy as administor
Post by: marylane on July 27, 2010, 11:56:05 AM

C:\>dir winturbo.bat
 Volume in drive C has no label.
 Volume Serial Number is 0652-E41D

 Directory of C:\

05/11/2010  11:59 PM               125 winturbo.bat
               1 File(s)            125 bytes
               0 Dir(s)  294,063,489,024 bytes free

C:\>copy winturbo.bat  C:\windows\system32\
        1 file(s) copied.

C:\>cd C:\windows\system32\

C:\Windows\System32>dir winturbo.bat
 
 Volume Serial Number is 0652-E41D

 Directory of C:\Windows\System32

05/11/2010  11:59 PM               125 winturbo.bat
               1 File(s)            125 bytes
               0 Dir(s)  294,063,489,024 bytes free

C:\Windows\System32>
Title: Re: W7 Run Xcopy as administor
Post by: Salmon Trout on July 27, 2010, 12:41:58 PM
...

Why are you still here?
Title: Re: W7 Run Xcopy as administor
Post by: peacepuppy on July 27, 2010, 01:30:25 PM
Have you tried going into safemode?
http://www.howtogeek.com/howto/windows-vista/how-to-delete-a-system-file-in-windows-vista/  

I dont work, i have to place a file in to the system32 folder.. i dont have to remove er replace a file.
Title: Re: W7 Run Xcopy as administor
Post by: MrSelfDestruct on July 27, 2010, 04:15:46 PM
Run it without @echo off and cls so we can see the error message. Hard to tell what's wrong otherwise.
Title: Re: W7 Run Xcopy as administor
Post by: spockrates on July 28, 2010, 12:50:00 PM
Hello,

I have to move a file with windows 7 to the "system32" folder. but it dont work with copy.
Can some one help or tell mee what is do wrong?

What i have is:

Code: [Select]
ECHO OFF

xcopy "File.txt" "C:\windows\system32"

CLS

What flavor of Windows 7 is it (Home, Ultimate, etc.) and is it 32-bit or 64-bit?

Title: Re: W7 Run Xcopy as administor
Post by: peacepuppy on July 30, 2010, 01:11:28 PM
Echo off dont help's.. the command screen close to fast..

U run windows 7 Prof 64bits
Title: Re: W7 Run Xcopy as administor
Post by: Salmon Trout on July 30, 2010, 01:25:42 PM
Echo off dont help's.. the command screen close to fast..

Don't run the batch from Windows Explorer. Open a command window, navigate to the folder and run the batch by typing its name.
Title: Re: W7 Run Xcopy as administor
Post by: peacepuppy on July 30, 2010, 04:23:44 PM
Don't run the batch from Windows Explorer. Open a command window, navigate to the folder and run the batch by typing its name.


Oke i have done that and i got the error:

permission denied
Title: Re: W7 Run Xcopy as administor
Post by: Salmon Trout on July 30, 2010, 04:51:25 PM
Oke i have done that and i got the error:

permission denied

Well, now you know why you can't move that file to the system32 folder. This is normal for a system folder in Windows 7. Why do you want to put the file in that folder? I don't think it is really called "file.txt", now is it?  ::)
Title: Re: W7 Run Xcopy as administor
Post by: peacepuppy on July 31, 2010, 05:28:47 AM
Well, now you know why you can't move that file to the system32 folder. This is normal for a system folder in Windows 7. Why do you want to put the file in that folder? I don't think it is really called "file.txt", now is it?  ::)


No i have to move a image(.BMP) in to the system32 with a batch file.

Is there no way that i can copy it as administror so that i got the premision?
Title: Re: W7 Run Xcopy as administor
Post by: Salmon Trout on July 31, 2010, 05:33:29 AM
Well, if you learn how to spell administrator that would be a start. Why don't you login as such?
Title: Re: W7 Run Xcopy as administor
Post by: Fleexy on July 31, 2010, 09:29:35 AM
Why are you moving a .BMP into the system folder?  I can't find any in mine.
Title: Re: W7 Run Xcopy as administor
Post by: BC_Programmer on July 31, 2010, 08:49:01 PM
Code: [Select]
runas /user:%computername%\administrator  cmd /c xcopy "File.txt" "C:\windows\system32"