Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.



Windows 7: help me w/ cmd prompt- invalid argument/option- 'Files\....\...'

20 Nov 2011   #1

Windows 7 professional 32bit
 
 
help me w/ cmd prompt- invalid argument/option- 'Files\....\...'

because of something unknown AVG stopped working for me, and i can't uninstall it normally because some files were missing... now i am trying to just delete everything manually in command prompt, except access is denied, so i must run a takeown command and a cacles command (? right).

k, so here's the problem:

when in command prompt i type... takeown /f c:\program files\avg\avg2012\avgsysx.dll

it returns with ERROR: Invalid Argument/Option - 'files\avg\avg2012\avgsysx.dll'

i am assuming that it's because there is a space in program files, i've tried typing it as c:\program_files\.... and c:\program%files.... but neither works... anybody? anything?

thanks p

My System SpecsSystem Spec
20 Nov 2011   #2

Microsoft Community Contributor Award Recipient

Windows 7 SP1, Home Premium, 64-bit
 
 

I've never used takeown, but...

are you trying to run this from c:\ ?????

can you instead navigate (change directories) to a prompt at C:\program files\avg\avg2012 and then just run takeown /f avgsysx.dll?

Or can you temporarily move or copy avgsysx to c:\temp and then run the command and then copy it back to avg folder if necessary?
My System SpecsSystem Spec
20 Nov 2011   #3

Windows 7 32 bit
 
 

Quote:
takeown /f c:\program files\avg\avg2012\avgsysx.dll
On the command line if a path has any spaces in it, you have to wrap it in double quotes.
For example to run c:\program files\myprog.exe from the command line I have to type
"c:\program files\myprog.exe"

Note the double quotes.
takeown /f "c:\program files\avg\avg2012\avgsysx.dll"
My System SpecsSystem Spec
.


20 Nov 2011   #4

Microsoft Community Contributor Award Recipient

Windows 7 SP1, Home Premium, 64-bit
 
 

Thanks for that, Miles. I've never heard of that and never been in such a situation.
My System SpecsSystem Spec
20 Nov 2011   #5

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by ignatzatsonic View Post
Thanks for that, Miles. I've never heard of that and never been in such a situation.
That's one of my Windows pet peeves is spaces in paths. Makes for a lot of messy programming. But we're stuck with it. Might be a good trivia question what version of Windows/Dos first allowed spaces in paths?

I don't remember myself it's been so long.
My System SpecsSystem Spec
20 Nov 2011   #6

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 16 MATE (64 bit)
 
 

Sometimes you need to use multiple sets of double quotes (").

For example, if the path has spaces AND you wish to execute a program with switches (I think this is the correct syntax. I can't find the batch file that I had to do this in):
cmd /k ""path\program.exe" switches"
My System SpecsSystem Spec
21 Nov 2011   #7

Windows 7 professional 32bit
 
 

thanks miles that solved the space problem, now able to take ownership but still can't delete,
so i'll run >Icacls "c:\program files\avg\avg2012\avgsysx.dll g/ username:f"
which returns success 0 fail 1........boo, well at least we solved the spacing?

i am understanding that i have taken ownership of the file, now i can grant myself full permissions with icacls command (my query turned up the cacls command but my cmd prompt says Note: Cacls is now deprecated, please use Icacls) so that i can delete the file... any more suggestions? prolly try it out in safe mode tomorrow
My System SpecsSystem Spec
21 Nov 2011   #8

Windows 7 Professional SP1 32-bit
 
 

Only include the path/filename within quotes, not the name and all the arguments. The command should look like this:

icacls "c:\program files\avg\avg2012\avgsysx.dll" /g username:f

But you also can make life much easier on yourself with this tutorial: Take Ownership Shortcut

Or try AVG's own cleanup tools here: http://www.avg.com/ww-en/utilities - might save you a lot of work, or at least get most of it done for you.
My System SpecsSystem Spec
21 Nov 2011   #9

Windows 7 professional 32bit
 
 
solved

thanks all for the help, in the end i had to boot up safe mode w command prompt to finally delete these files and get the icacls command to work. thx
My System SpecsSystem Spec
22 Nov 2011   #10

Windows 7 Professional SP1 32-bit
 
 

Glad you were successful in the end. To make sure that your system really is free of any and all AVG remnants, I still recommend downloading the AVG cleanup tool I linked to in my previous post - especially because of the registry keys left behind.

Then grab a solid replacement antivirus such as avast! or better yet, Microsoft Security Essentials.
My System SpecsSystem Spec
Reply

 help me w/ cmd prompt- invalid argument/option- 'Files\....\...'





Thread Tools



Similar help and support threads for2: help me w/ cmd prompt- invalid argument/option- 'Files\....\...'
Thread Forum
Extracting files from an executable with the command prompt General Discussion
Dell Factory Settings isn't option - command prompt? Backup and Restore
How do I command prompt style share my files with RDP? Network & Sharing
Links to PNG files don't open in IE9, prompt for download Browsers & Mail
Adding "Open Command Prompt" Option Customization
Bluetooth Problem " An invalid Argument was supplid " Hardware & Devices
webpage error - invalid argument Browsers & Mail

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 10:08 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33