Solved

windows cmd not working in vista

Posted on 2009-04-14
16
712 Views
Last Modified: 2012-05-06
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
Comment
Question by:emeraldpiggy
  • 6
  • 2
  • 2
  • +4
16 Comments
 
LVL 5

Accepted Solution

by:
mfhorizon earned 40 total points
ID: 24135860
Try this:
COPY (or XCOPY) <source> <destination>
Use the "/y" switch to avoid the overwrite prompt.
0
 
LVL 5

Assisted Solution

by:mfhorizon
mfhorizon earned 40 total points
ID: 24135867
XCOPY is more suitable...
0
 
LVL 15

Assisted Solution

by:tenaj-207
tenaj-207 earned 40 total points
ID: 24135962
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 17

Assisted Solution

by:Nik
Nik earned 40 total points
ID: 24136063
What error do you get?
Is UAC turned on?
If yes, then you'll have to run CMD with elevated privilegies.
0
 
LVL 1

Assisted Solution

by:bigpadhakoo
bigpadhakoo earned 40 total points
ID: 24136101
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
 
LVL 17

Assisted Solution

by:Nik
Nik earned 40 total points
ID: 24136117
Don't shut off UAC, it can be useful.
http://www.wincert.net/forum/index.php?showtopic=4280
0
 
LVL 1

Assisted Solution

by:bigpadhakoo
bigpadhakoo earned 40 total points
ID: 24136167
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
 
LVL 69

Assisted Solution

by:Qlemo
Qlemo earned 20 total points
ID: 24138030
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
 
LVL 6

Assisted Solution

by:Justin_W_Chandler
Justin_W_Chandler earned 20 total points
ID: 24138457
I believe you should be using %windir% and not %windows%.
0
 

Author Comment

by:emeraldpiggy
ID: 24143672
bigpadhakoo:

it says system error 5 has occurred.  Access is denied
and i am the administrator !
0
 

Author Comment

by:emeraldpiggy
ID: 24143676
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
 

Author Comment

by:emeraldpiggy
ID: 24143686
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
 

Author Comment

by:emeraldpiggy
ID: 24143712
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
 
LVL 15

Assisted Solution

by:tenaj-207
tenaj-207 earned 40 total points
ID: 24144008
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
 

Author Comment

by:emeraldpiggy
ID: 24144053
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
 

Author Closing Comment

by:emeraldpiggy
ID: 31569808
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now