Command Prompt

Windows OS Specific Topics
Post Reply
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Command Prompt

Post by Nipuna » Sat Oct 16, 2010 3:45 pm

Hey Friends

I am Doing some Command Line Works Just for Learning and Fun

But I have a Problem, That is

I tried to Copy a text file via Command Prompt to my C Drive but it said Access Denied. :(

I can copy to folders in Desktop but Can't copy Elsewhere in C Drive. But Can Copy to D,E and F

I am Running Windows 7 and It's Security is Higher than XP. I found that when I try to access my "C:\Users\Nipuna Dananjaya\Start Menu" it was Hidden by Default.

How can I remove this Security and Copy files to C Drive? Because I have some Experiments to do. ;) If i have more Problem when I doing my Experiments I will ask you :D

After I make it then I will tell you Guys. :)

For Now Help me for my Question

Thanks
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Command Prompt

Post by Neo » Sat Oct 16, 2010 5:29 pm

We already know that there are many differences in terms of security in Windows7 that resulted in upgrading packages to support Windows7 standards. Lots of software companies had to spend considerable energy to achieve this goal.

One example is about installing a legacy application inside 'Program files'. Programs can install under 'Program Files' folder, however user files can't be saved there. If a legacy application tries to store, then it will be placed inside a special location called Vitual Store. Virtual Store is a part of File System Virtualization under UAC (User Account Control).

File System Virtualization

Windows® Registry Virtualization

Moreover, the File System Virtualization is UAC's File Virtualization Filter Driver (%SystemRoot%\System32\Drivers\Luafv.sys) which implements file system virtualization.

The %localappdata%\VirtualStore\ is often used for legacy applications that run under restricted accounts, a Standard User that uses this legacy application will NOT know, because Standard Users sometimes think that it is a BUG, but it isn’t, it is part of UACs File System Virtualization Filter Driver. The application is denied access, it doesn't have full rights to write to that directory and that *.ini, so File System Virtualization will redirect it to another path.

In simple terms, legacy applications need to be re-coded to avoid access to restricted folders in Windows7.

Now if I get back to your problem, this is also a UAC related case. Run the "Command Prompt" as administrator to get rid of this issue (Just right click on Accessories->Command Prompt and select Run as admin).Notice the title of the Command Prompts which appears as "Administrator: Command Prompt".
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: Command Prompt

Post by Nipuna » Sat Oct 16, 2010 8:00 pm

It worked Buddy :D

But I tried to copy a file it is "1.txt" by typing this Command "copy 1.txt C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\"

But it says "The Syntax of the Command is Incorrect " Please Help me for that

But I was Able to Copy it to C drive by using this Command "copy 1.txt C:\"

I think there is a mistake of my First Command.

Help Me for that.

Thanks
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Command Prompt

Post by Neo » Sun Oct 17, 2010 1:12 am

Put double quotes to paths with spaces within. Notice "Start Menu" has a space.

copy 1.txt "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\"

NOTE: Please try to start a new topic for separate questions.
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: Command Prompt

Post by Nipuna » Sun Oct 17, 2010 7:15 am

Thanks Buddy It Worked :D

What is the wrong with the Topic? I add my Question Under this Topic Because It's Related to Command Prompt.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Command Prompt

Post by Neo » Mon Oct 18, 2010 10:57 am

Please add a descriptive topic title. ROBOT.LK's intention is not to just help you. If that is only you, then it will become an individual tution class kind of a thing (as I said before). So a descriptive topic title will help others who are looking for the same issue.

For example: The title for the first post with command prompt problem would be "Permission denied when trying to copy on command prompt / Windows7"

The second title would be "Copy command syntax error in command prompt / Windows 7"

Try your best :)
Post Reply

Return to “Windows”