Solved

windows cmd not working in vista

Posted on 2009-04-14
16
718 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

 
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 70

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
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…
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

690 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