cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bluestar8783
Level 5

How to delete file from 64 bits platform?

I want to delete file in Windows\system32\drivers\*.sys in Vista 64-bits.
I used below functions to delete file, but failed.
What's wrong with my code(InstallScript Project)?
Thanks for your help.

//------------------------------------------------------//
GetWinSystemPath()
{
if (m_bWin64) then
GetSystemWow64DirectoryA(m_szWinSysDir, 1024);
else
m_szWinSysDir=WINSYSDIR;
endif;
}

DeleteSysFile()
{
if(m_bVista) then
if(m_bWin64) then
szDriverPath = m_szWinSysDir + "\\drivers\\" + DRV_NAME_VISTA_64;
else
szDriverPath = m_szWinSysDir + "\\drivers\\" + DRV_NAME_VISTA_32;
endif;
elseif(SYSINFO.WINNT.bWin2000 | SYSINFO.WINNT.bWinXP) then
szDriverPath = m_szWinSysDir + "\\drivers\\" + DRV_NAME_XP2K;
endif;

if(Is(FILE_EXISTS, szDriverPath)) then
DeleteFile(szDriverPath);
endif;
}
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Perhaps look into disabling WOW64FSREDIRECTION? (Don't forget to re-enable it.)
0 Kudos