[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 726
  • Last Modified:

windows cmd not working in vista

hi,  i am running one command line while it works in xp its not working in vista for somehow
can anyone plz tell me whats wrong with this line?
thanks
copy CodeSmith.Engine.dll %windows%\assembly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7a\ /Y

Open in new window

0
emeraldpiggy
Asked:
emeraldpiggy
  • 6
  • 2
  • 2
  • +4
10 Solutions
 
mfhorizonCommented:
Try this:
COPY (or XCOPY) <source> <destination>
Use the "/y" switch to avoid the overwrite prompt.
0
 
mfhorizonCommented:
XCOPY is more suitable...
0
 
tenaj-207Commented:
Vista comes with and even better program to copy files caled robocopy.  

I like to specify everything (e), the retry (r), the verbose level (v), the option to eXclude Older (xo), and a out-put log.  So it'd look like this.

robocopy CodeSmith.Engine.dll %windows%\assembly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7a\ /E /XO /R:1 /W:3 /V /log:c:\output.txt

That means it'd copy everything except if it has an older or THE SAME date, only retry once (the default is some ridiculously high number) and wait time between retrys is 3 sec and the verbosity is set to high.  Lastly I can review the log to confirm that it got everything.

Hope that helps.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
NikCommented:
What error do you get?
Is UAC turned on?
If yes, then you'll have to run CMD with elevated privilegies.
0
 
bigpadhakooCommented:
turn of UAC or Start cmd as administrator or simply activate administrator account by using following command line

to activate : net user administrator /active:yes
to deactivate : net user administrator /active:no
0
 
NikCommented:
Don't shut off UAC, it can be useful.
http://www.wincert.net/forum/index.php?showtopic=4280
0
 
bigpadhakooCommented:
activating admin account gives you exclusive privileges and after you desired changes you may simply deactivate. with this you will not have to turn off uac.
0
 
QlemoC++ DeveloperCommented:
I believe in GAC as protected folder. Even an admin does not have write permission, only Trusted Installer has. If that is the case, you will need to take ownership and than redefine access permissions to perform the copy.

0
 
Justin_W_ChandlerCommented:
I believe you should be using %windir% and not %windows%.
0
 
emeraldpiggyAuthor Commented:
bigpadhakoo:

it says system error 5 has occurred.  Access is denied
and i am the administrator !
0
 
emeraldpiggyAuthor Commented:
to Qlemo:
thanks qlemo
but how do i do that?


to tenaj-207:
it still shows access denied for c:\output.txt
and invalid parameter /log c:\output.txt
0
 
emeraldpiggyAuthor Commented:
to tenaj-207:

C:\Program Files\CodeSmith\v5.0\bin>robocopy CodeSmith.Engine.dll %windir%\assem
bly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7a\ /E /XO /R:1 /W:3 /

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows

-------------------------------------------------------------------------------

  Started : Wed Apr 15 09:43:07 2009

   Source - C:\Program Files\CodeSmith\v5.0\bin\CodeSmith.Engine.dll\
     Dest - C:\Windows\assembly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7
a\

    Files :
  Options : /S /E /COPY:DAT /XO /R:1 /W:3

------------------------------------------------------------------------------

ERROR : Invalid Parameter #7 : "/"

       Simple Usage :: ROBOCOPY source destination /MIR

             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               /MIR :: Mirror a complete directory tree.

    For more usage information run ROBOCOPY /?

****  /MIR can DELETE files as well as copy them !
0
 
emeraldpiggyAuthor Commented:
to mfhorizon:
thanks
but it still shows the error msg
invaild path
0 files copied

xcopy CodeSmith.Engine.dll %windir%\assembly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7a\ /Y
0
 
tenaj-207Commented:
You didn't get the whole command.  Try this one;

Since you are copying this to the windows directory it will probably be necessary to run this in administrator mode.  To do this type in CMD in the start search bar then right click on the cmd.exe icon in the list above and choose "Run as administrator."

If you have any problems post the c:\output.txt log.
robocopy CodeSmith.Engine.dll %windir%\assembly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7a\ /E /XO /R:1 /W:3 /V /log:c:\output.txt

Open in new window

0
 
emeraldpiggyAuthor Commented:
thanks tenai-207
it went thru . however it shows error in output.txt


-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                              
-------------------------------------------------------------------------------

  Started : Wed Apr 15 11:13:10 2009

   Source : C:\Program Files\CodeSmith\v5.0\bin\CodeSmith.Engine.dll\
     Dest : C:\Windows\assembly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7a\

    Files : *.*
          
  Options : *.* /V /S /E /COPY:DAT /XO /R:1 /W:3

------------------------------------------------------------------------------

2009/04/15 11:13:10 ERROR 123 (0x0000007B) Accessing Source Directory C:\Program Files\CodeSmith\v5.0\bin\CodeSmith.Engine.dll\
The filename, directory name, or volume label syntax is incorrect.

0
 
emeraldpiggyAuthor Commented:
thanks, that was excellent answers
i got it work by running it as the administrator and run command

xcopy CodeSmith.Engine.dll %windir%\assembly\GAC_32\CodeSmith.Engine\5.0.0.0__9fd61cdb91609a7a\ /Y
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 6
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now