Hi,
I want a c program to edit certain files in the windows root directory i.e c:\windows. Can anybody give me the program code to change from the current directory to the root directory.
Thanks in advance,
Regards,
vinith98
Hi,
I want a c program to edit certain files in the windows root directory i.e c:\windows. Can anybody give me the program code to change from the current directory to the root directory.
Thanks in advance,
Regards,
vinith98
Thanx Elysia...
but how do i use chdir() yo go to the root of the OS ??
What are the parameters i should use ??
I can't imagine that you should be editing files in the Window directory, in the first place.
Not exactly in the windows directory...
I want to edit the host file in the C:\WINDOWS\system32\drivers\etc directory...
chdir("\\") should work right ??
Nothing to do with any kind of malicious software, m jus tryin to learn C, thats it...
Jus read about the host file on a forum, so jus tryin to play around with it.
Why do you want to delete and edit something from the system file folder. If you are trying to learning or do something, try it on a different dirctory and see. Then when you are sure about what you are doing then go ahead. Changing stuff under windows directory is not a good idea unless u know what u are doing.
ssharish
ya got it...
Anyways thanks for the advice.
Vinith