how to create file under "system32"?  
Author Message
paulfiera





PostPosted: Mon Feb 18 18:39:52 PST 2008 Top

Windows Vista >> how to create file under "system32"?

My questions:
1. is it possible to create new files under "SYSTEM32" in runtime of an
user's application?
2. after the file creation, where to find it?

Windows Vista10  
 
 
Mr





PostPosted: Mon Feb 18 18:39:52 PST 2008 Top

Windows Vista >> how to create file under "system32"?


> My questions:
> 1. is it possible to create new files under "SYSTEM32" in runtime of an
> user's application?

The only way that will happen is the application is running with Run As
Administered privileges,when it's saving the file.

> 2. after the file creation, where to find it?
>

If you have to ask this question, then maybe you shouldn't be doing it.

 
 
fuzor_silverbolt





PostPosted: Mon Feb 18 18:35:51 PST 2008 Top

Windows Vista >> how to create file under "system32"?
1.) Yes, given permissions for the operation are acceptible to the os or
permitted by the user. Or if the program is given elevated permissions
by the user on startup.

2.) What do you mean? The file specified would be created on the
specified path. Like: %SystemRoot%\system32\<filename.txt>

Please elaborate more on your question, it is very unclear what you are
looking for... unless I answered it sufficiently.


--
fuzor_silverbolt

-----------My Rig-----------
Manufacturer: Dell Inc.

~2.7GHz
Memory: 3326MB RAM
Hard Drive: 984 GB 2x500GB RAID 0
Video Card: NVIDIA GeForce 8800 GT
Monitor: SyncMaster 2220WM/G22PW/220WM(Digital)
Sound Card: SigmaTel High Definition Audio CODEC
Operating System: Windows Vista? Ultimate 32bit
 
 
Fall





PostPosted: Mon Feb 18 22:59:00 PST 2008 Top

Windows Vista >> how to create file under "system32"? Thanks for your answers.
In fact, I use the code below to create file under "SYSTEM32"
ofstream myNewFile;
myNewFile.open("c:\windows\system32\newfile.txt");
myNewFile<<"this is a new file.";
myNewFile.flush();
myNewFile.close();
After running these steps, I can not find the "newfile.txt" under SYSTEM32.

But, when I use the code below to read the file, I can get the content of it:
ifstream ifs;
ifs.open("c:\windows\system32\newfile.txt");
//get data from file
ifs>>m_cBufData;

Where is the file I created?