PDA

View Full Version : how to copy file to system32 regardless of partition C: or D: etc


morci
04-21-2003, 04:09 AM
Hi,

How can you determine where is windows installed?
I need to copy a file to the system32 folder in windows, the install needs to be able to switch regardless of windows installation, eg:

win98 = no system32 folder, install normally in c:
winnt4 = c:\winnt\system32, what happens in dual boot systems?
win2k = c:\winnt\system32, what happens in dual boot systems? what happens when installed in D:\winnt\system32
Xp = back to windows\system32

can anyone please help me? i need to copy a file but dont know how to find out the drive letter of the windows installation

Morci

Corey
04-21-2003, 04:12 AM
Have you tried using %WinDir% ?

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

morci
04-21-2003, 04:26 AM
Hi Corey,
Does this mean that i can copy file like this?

File.Copy (%WinDir%\System32)

How about delete?
Can i just ran command to delete file like this
File.Delete (%WinDir%\System32\xnmp.exe)

Thanks
Morci

Corey
04-21-2003, 04:29 AM
Test it out and see, I'm no expert on Windows, should work though... Some of the other staff are more up on that than me, I'm sure someone else will be checking in over the next day or so...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Derek
04-21-2003, 05:26 AM
Hi - you can use %SysDir% ... this is used for the path to the user’s Windows System directory