Solved

windows cmd not working in vista

Posted on 2009-04-14
16
710 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
Comment Utility
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
Comment Utility
XCOPY is more suitable...
0
 
LVL 15

Assisted Solution

by:tenaj-207
tenaj-207 earned 40 total points
Comment Utility
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
 
LVL 17

Assisted Solution

by:Nik
Nik earned 40 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 68

Assisted Solution

by:Qlemo
Qlemo earned 20 total points
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 6

Assisted Solution

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

Author Comment

by:emeraldpiggy
Comment Utility
bigpadhakoo:

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

Author Comment

by:emeraldpiggy
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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

11 Experts available now in Live!

Get 1:1 Help Now