Dear Sir,
In WinXP 64bit platform, when I use DeleteFile function to delete
c:\windows\system32\drivers\a.sys ,it can not delete successfully , the
error code is 2(GetLastError ,means can not find the file, but the file is
in the folder),
I guess the system protect the system folder ,then how can I delete the
files in the system folder ?
3ks!

Re: How to delete system file in WinXp 64bit platform? by Doron

Doron
Sun May 29 21:09:16 CDT 2005

why do you want to delete serial.sys? is it so that your driver can control
the serial ports instead? if so, there are easier ways. Just install your
driver for all the ports on teh machine. Also, change the start type of
serial to disabled via the Service Control Manager (SCM) APIs.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Cathy" <cpliang0@winbond.com.tw> wrote in message
news:OqWvQmLZFHA.2256@TK2MSFTNGP10.phx.gbl...
> Dear Sir,
> In WinXP 64bit platform, when I use DeleteFile function to delete
> c:\windows\system32\drivers\a.sys ,it can not delete successfully , the
> error code is 2(GetLastError ,means can not find the file, but the file is
> in the folder),
> I guess the system protect the system folder ,then how can I delete
> the
> files in the system folder ?
> 3ks!
>
>



Re: How to delete system file in WinXp 64bit platform? by Cathy

Cathy
Sun May 29 21:47:53 CDT 2005

Dear Sir,
I write a setup program to install my driver, the sys file is copyed
to the c:\windows\system32\drivers folder by system , when uninstall , I
want to delete the sys file . but DeleteFile function can not work well .

Thanks!

Cathy


"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:utYWWyLZFHA.2768@tk2msftngp13.phx.gbl...
> why do you want to delete serial.sys? is it so that your driver can
control
> the serial ports instead? if so, there are easier ways. Just install
your
> driver for all the ports on teh machine. Also, change the start type of
> serial to disabled via the Service Control Manager (SCM) APIs.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
> "Cathy" <cpliang0@winbond.com.tw> wrote in message
> news:OqWvQmLZFHA.2256@TK2MSFTNGP10.phx.gbl...
> > Dear Sir,
> > In WinXP 64bit platform, when I use DeleteFile function to delete
> > c:\windows\system32\drivers\a.sys ,it can not delete successfully , the
> > error code is 2(GetLastError ,means can not find the file, but the file
is
> > in the folder),
> > I guess the system protect the system folder ,then how can I delete
> > the
> > files in the system folder ?
> > 3ks!
> >
> >
>
>



Re: How to delete system file in WinXp 64bit platform? by Doron

Doron
Mon May 30 11:17:44 CDT 2005

are you trying to overwrite serial.sys? or are you trying to delete
serial.sys as an experiment? What type of user are you when you are trying
to delete the file? You must be an administrator to delete the file. If
all else fails, bring up the directory in explorer, right click on the file
in question and view the security tab. See if your user group is listed.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Cathy" <cpliang0@winbond.com.tw> wrote in message
news:ueVp8HMZFHA.3132@TK2MSFTNGP09.phx.gbl...
> Dear Sir,
> I write a setup program to install my driver, the sys file is
> copyed
> to the c:\windows\system32\drivers folder by system , when uninstall , I
> want to delete the sys file . but DeleteFile function can not work well .
>
> Thanks!
>
> Cathy
>
>
> "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
> news:utYWWyLZFHA.2768@tk2msftngp13.phx.gbl...
>> why do you want to delete serial.sys? is it so that your driver can
> control
>> the serial ports instead? if so, there are easier ways. Just install
> your
>> driver for all the ports on teh machine. Also, change the start type of
>> serial to disabled via the Service Control Manager (SCM) APIs.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>>
>> "Cathy" <cpliang0@winbond.com.tw> wrote in message
>> news:OqWvQmLZFHA.2256@TK2MSFTNGP10.phx.gbl...
>> > Dear Sir,
>> > In WinXP 64bit platform, when I use DeleteFile function to delete
>> > c:\windows\system32\drivers\a.sys ,it can not delete successfully , the
>> > error code is 2(GetLastError ,means can not find the file, but the file
> is
>> > in the folder),
>> > I guess the system protect the system folder ,then how can I delete
>> > the
>> > files in the system folder ?
>> > 3ks!
>> >
>> >
>>
>>
>
>



Re: How to delete system file in WinXp 64bit platform? by Cathy

Cathy
Mon May 30 19:52:30 CDT 2005

Dear Sir,
Thanks for your answer!
My user account is administrator,I can delete the .sys file manually in
the system32 folder,but I can not delete the file by call DeleteFile()
function,GetLastError() return value shows it can not find the special
file,but the file exist.
Another method: I can call bat file to delete the .sys file in the
local 64bit PC,but I can not delete the file by using un-install program to
call the bat file.Of course, I compile my setup program in 32bit.
Looking forward to hearing good news!

Cathy



"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:ux4hdMTZFHA.2288@TK2MSFTNGP14.phx.gbl...
> are you trying to overwrite serial.sys? or are you trying to delete
> serial.sys as an experiment? What type of user are you when you are
trying
> to delete the file? You must be an administrator to delete the file. If
> all else fails, bring up the directory in explorer, right click on the
file
> in question and view the security tab. See if your user group is listed.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
> "Cathy" <cpliang0@winbond.com.tw> wrote in message
> news:ueVp8HMZFHA.3132@TK2MSFTNGP09.phx.gbl...
> > Dear Sir,
> > I write a setup program to install my driver, the sys file is
> > copyed
> > to the c:\windows\system32\drivers folder by system , when uninstall , I
> > want to delete the sys file . but DeleteFile function can not work well
.
> >
> > Thanks!
> >
> > Cathy
> >
> >
> > "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
> > news:utYWWyLZFHA.2768@tk2msftngp13.phx.gbl...
> >> why do you want to delete serial.sys? is it so that your driver can
> > control
> >> the serial ports instead? if so, there are easier ways. Just install
> > your
> >> driver for all the ports on teh machine. Also, change the start type o
f
> >> serial to disabled via the Service Control Manager (SCM) APIs.
> >>
> >> d
> >>
> >> --
> >> Please do not send e-mail directly to this alias. this alias is for
> >> newsgroup purposes only.
> >> This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >>
> >>
> >> "Cathy" <cpliang0@winbond.com.tw> wrote in message
> >> news:OqWvQmLZFHA.2256@TK2MSFTNGP10.phx.gbl...
> >> > Dear Sir,
> >> > In WinXP 64bit platform, when I use DeleteFile function to delete
> >> > c:\windows\system32\drivers\a.sys ,it can not delete successfully ,
the
> >> > error code is 2(GetLastError ,means can not find the file, but the
file
> > is
> >> > in the folder),
> >> > I guess the system protect the system folder ,then how can I
delete
> >> > the
> >> > files in the system folder ?
> >> > 3ks!
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: How to delete system file in WinXp 64bit platform? by 440gtx

440gtx
Mon May 30 23:25:14 CDT 2005

By default you can not perform file operations to the system32 sub-tree
from a 32-bit Windows application. This is because there is a file
system redirector that reflects operations to the WOW64 directory. More
info here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/file_system_redirector.asp


Re: How to delete system file in WinXp 64bit platform? by Cathy

Cathy
Tue May 31 02:28:43 CDT 2005

Dear Sir,
Thanks for your answer!
The method you mention in your mail i have tried before,but
failed, i also tried as follows,failed again:
1. I write the hard code of the path
"c:\windows\system32\drivers\a.sys";
2. I use GetSystemWow64Directory () function get the system
directory,message box shows the path is "c:\windows\sysWow64",i use the
return path +"\drivers\a.sys" in DeleteFile() function;
3. I new a A.txt file in system32 folder,use the above two method
to delete the file;
All above 3 methods,GetLastError() return value shows can not find
the special file.
Any comment is welcome!
Thanks!


Cathy


<440gtx@email.com> wrote in message
news:1117513514.218813.33980@g49g2000cwa.googlegroups.com...
> By default you can not perform file operations to the system32 sub-tree
> from a 32-bit Windows application. This is because there is a file
> system redirector that reflects operations to the WOW64 directory. More
> info here:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64
/file_system_redirector.asp
>



Re: How to delete system file in WinXp 64bit platform? by Doron

Doron
Tue May 31 08:58:09 CDT 2005

sorry, i don't know the answer.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Cathy" <cpliang0@winbond.com.tw> wrote in message
news:%23WOFIsXZFHA.2452@TK2MSFTNGP12.phx.gbl...
> Dear Sir,
> Thanks for your answer!
> My user account is administrator,I can delete the .sys file manually
> in
> the system32 folder,but I can not delete the file by call DeleteFile()
> function,GetLastError() return value shows it can not find the special
> file,but the file exist.
> Another method: I can call bat file to delete the .sys file in the
> local 64bit PC,but I can not delete the file by using un-install program
> to
> call the bat file.Of course, I compile my setup program in 32bit.
> Looking forward to hearing good news!
>
> Cathy
>
>
>
> "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
> news:ux4hdMTZFHA.2288@TK2MSFTNGP14.phx.gbl...
>> are you trying to overwrite serial.sys? or are you trying to delete
>> serial.sys as an experiment? What type of user are you when you are
> trying
>> to delete the file? You must be an administrator to delete the file. If
>> all else fails, bring up the directory in explorer, right click on the
> file
>> in question and view the security tab. See if your user group is listed.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>>
>> "Cathy" <cpliang0@winbond.com.tw> wrote in message
>> news:ueVp8HMZFHA.3132@TK2MSFTNGP09.phx.gbl...
>> > Dear Sir,
>> > I write a setup program to install my driver, the sys file is
>> > copyed
>> > to the c:\windows\system32\drivers folder by system , when uninstall ,
>> > I
>> > want to delete the sys file . but DeleteFile function can not work well
> .
>> >
>> > Thanks!
>> >
>> > Cathy
>> >
>> >
>> > "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
>> > news:utYWWyLZFHA.2768@tk2msftngp13.phx.gbl...
>> >> why do you want to delete serial.sys? is it so that your driver can
>> > control
>> >> the serial ports instead? if so, there are easier ways. Just install
>> > your
>> >> driver for all the ports on teh machine. Also, change the start type
>> >> o
> f
>> >> serial to disabled via the Service Control Manager (SCM) APIs.
>> >>
>> >> d
>> >>
>> >> --
>> >> Please do not send e-mail directly to this alias. this alias is for
>> >> newsgroup purposes only.
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> > rights.
>> >>
>> >>
>> >> "Cathy" <cpliang0@winbond.com.tw> wrote in message
>> >> news:OqWvQmLZFHA.2256@TK2MSFTNGP10.phx.gbl...
>> >> > Dear Sir,
>> >> > In WinXP 64bit platform, when I use DeleteFile function to
>> >> > delete
>> >> > c:\windows\system32\drivers\a.sys ,it can not delete successfully ,
> the
>> >> > error code is 2(GetLastError ,means can not find the file, but the
> file
>> > is
>> >> > in the folder),
>> >> > I guess the system protect the system folder ,then how can I
> delete
>> >> > the
>> >> > files in the system folder ?
>> >> > 3ks!
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Re: How to delete system file in WinXp 64bit platform? by Alexander

Alexander
Wed Jun 01 00:34:44 CDT 2005

Try \\?\c:\windows\system32\drivers

"Cathy" <cpliang0@winbond.com.tw> wrote in message
news:%23WOFIsXZFHA.2452@TK2MSFTNGP12.phx.gbl...
> Dear Sir,
> Thanks for your answer!
> My user account is administrator,I can delete the .sys file manually
> in
> the system32 folder,but I can not delete the file by call DeleteFile()
> function,GetLastError() return value shows it can not find the special
> file,but the file exist.
> Another method: I can call bat file to delete the .sys file in the
> local 64bit PC,but I can not delete the file by using un-install program
> to
> call the bat file.Of course, I compile my setup program in 32bit.
> Looking forward to hearing good news!
>
> Cathy
>
>
>
> "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
> news:ux4hdMTZFHA.2288@TK2MSFTNGP14.phx.gbl...
>> are you trying to overwrite serial.sys? or are you trying to delete
>> serial.sys as an experiment? What type of user are you when you are
> trying
>> to delete the file? You must be an administrator to delete the file. If
>> all else fails, bring up the directory in explorer, right click on the
> file
>> in question and view the security tab. See if your user group is listed.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>>
>> "Cathy" <cpliang0@winbond.com.tw> wrote in message
>> news:ueVp8HMZFHA.3132@TK2MSFTNGP09.phx.gbl...
>> > Dear Sir,
>> > I write a setup program to install my driver, the sys file is
>> > copyed
>> > to the c:\windows\system32\drivers folder by system , when uninstall ,
>> > I
>> > want to delete the sys file . but DeleteFile function can not work well
> .
>> >
>> > Thanks!
>> >
>> > Cathy
>> >
>> >
>> > "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
>> > news:utYWWyLZFHA.2768@tk2msftngp13.phx.gbl...
>> >> why do you want to delete serial.sys? is it so that your driver can
>> > control
>> >> the serial ports instead? if so, there are easier ways. Just install
>> > your
>> >> driver for all the ports on teh machine. Also, change the start type
>> >> o
> f
>> >> serial to disabled via the Service Control Manager (SCM) APIs.
>> >>
>> >> d
>> >>
>> >> --
>> >> Please do not send e-mail directly to this alias. this alias is for
>> >> newsgroup purposes only.
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> > rights.
>> >>
>> >>
>> >> "Cathy" <cpliang0@winbond.com.tw> wrote in message
>> >> news:OqWvQmLZFHA.2256@TK2MSFTNGP10.phx.gbl...
>> >> > Dear Sir,
>> >> > In WinXP 64bit platform, when I use DeleteFile function to
>> >> > delete
>> >> > c:\windows\system32\drivers\a.sys ,it can not delete successfully ,
> the
>> >> > error code is 2(GetLastError ,means can not find the file, but the
> file
>> > is
>> >> > in the folder),
>> >> > I guess the system protect the system folder ,then how can I
> delete
>> >> > the
>> >> > files in the system folder ?
>> >> > 3ks!
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>