Re: How to copy Dll/Exe in \Windows



Try this:

CopyFile(_T("\\MyFolder\\temp.txt"),_T("\\Windows\\temp.txt"), FALSE));


--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Rahul P. Shukla" <RahulPShukla@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:360672EC-311F-439A-B0F0-3E45CE6BC790@xxxxxxxxxxxxxxxx
Hi,
My simple code is as :
CopyFile(_T("\\MyFolder\\temp.txt"),_T("\\Windows"), FALSE));
CopyFile(_T("\\MyFolder\\ceramdrv.exe"),_T("\\Windows"));
and DLL also...
All 3 are throwing a GetLastError() of "ERROR_ACCESS_DENIED" and when use
MoveFile(), throwing "ERROR_ALREADY_EXISTS" though the files are not in
windows.
If OS is protecting direct acceesing of windows files (according to some
blogs its ROM), If these 2 API are not able to copy then:

1. How I am able to copy manually?
2. How my cab file is installing files in windows

any help plz .????

- Rahul

"<ctacke/>" wrote:

Many of the files in the \Windows folder are in ROM and aren't actually
"files" per se. Those files cannot be copied. It's likely that whatever
you're trying to do by copying them probably won't work either - for
example
you can't copy something like cellcore.dll to another device and have it
magically become a phone device.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com


"Rahul P. Shukla" <RahulPShukla@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:44BEAC4B-0A86-4DCC-B779-DE9229E9C90C@xxxxxxxxxxxxxxxx
Hi,
In my WM5/WinCE5 devices, I am not able to copy any DLL/EXE file. I am
using
copyfile(), but its giving "Access Denied" error. I used MoveFile()
also,
but
gone in vain. But manually we can copy those files. What is reason I am
not
able to do this? Also How can I do this? Dons OS restricting me to do
this?
But when we create any installer file (.cab file) that can copy the
files
in
\Windows ??
Any help plz ???

Thanks .






.



Relevant Pages

  • Re: HID link problems
    ... focus on Windows CE. ... > "Bruce Eitman (eMVP)" wrote: ... >> beitman AT applieddata DOT net ...
    (microsoft.public.windowsce.app.development)
  • Re: keyboard - enable character repeat
    ... I've search for the whole Windows CE Tool directory but couldn't find the ... "Bruce Eitman (eMVP)" wrote: ... > beitman AT applieddata DOT net ... > Microsoft WEP Gold-level Member ...
    (microsoft.public.windowsce.embedded)
  • Re: Startup files
    ... the startup of the Windows CE. ... "Bruce Eitman (eMVP)" wrote: ... > beitman AT applieddata DOT net ... > Microsoft WEP Gold-level Member ...
    (microsoft.public.windowsce.embedded)
  • Re: embedded VC++ 4.0 installation problem
    ... You will find better answers if you ask this in an XPe newsgroup, ... Bruce Eitman (eMVP) ... beitman AT applieddata DOT net ... > 3) For Windows XP Embedded, does this OS have EAP protocols built in? ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: How to detect windows ce .NET?
    ... that will tell you what version of Windows CE you're running (.NET = CE ... There are many custom devices with ... Michael Salamone [eMVP] ... beitman AT applieddata DOT net ...
    (microsoft.public.windowsce.embedded)