Click here to Skip to main content
12,360,479 members (57,042 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ VisualC++
Hi,

How to copy .xml or .txt files to "C:\windows\system32" using c++ or vc++.

Thank u in advance.
Posted 20-Nov-12 19:07pm
Kumar 091.2K
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

CopyFile is your friend http://msdn.microsoft.com/en-us/library/windows/desktop/aa363851%28v=vs.85%29.aspx[^]

Are you sure you want to copy files of type xml or txt into System32? What is your goal?
  Permalink  
Comments
chandanadhikari 21-Nov-12 3:09am
   
my 5! should serve the purpose
Andy411 21-Nov-12 3:18am
   
thx :-)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

You could use Copyfile function or the movefile.or you could diretcly create your file in the syste32 by using expandenvironmentstring function or you could use function GetSystemDirectory for getting the path of system 32.and create the file there directly
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100