Ver Mensaje Individual
  #15  
Antiguo 23-03-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Pues en el caso de ME, lo que se debe usar es la API MoveFileEx, con el parámetro MOVEFILE_DELAY_UNTIL_REBOOT, sin embargo (me dirán que) dicho parámetro solo es compatible con tecnología NT, CIERTO, pero revisando un poco la ayuda de la API tenemos:
Cita:
Empezado por (F1) MoveFileEx
Windows 95:
The MOVEFILE_DELAY_UNTIL_REBOOT flag is not supported. To rename or delete a file at reboot on a Windows 95 system, place an entry in the WININIT.INI file in the Windows directory.

For example, on Windows 95, the following code fragment creates WININIT.INI entries that delete szDstFile and rename szSrcFile to be szDstFile at reboot:

GetWindowsDirectory(szWinInitFile, uSize);
lstrcat(szWinInitFile, "\\WININIT.INI");
WritePrivateProfileString("Rename", "NUL", szDstFile, szWinInitFile);
WritePrivateProfileString("Rename", szDstFile, szSrcFile, szWinInitFile);
y allí tenemos la solución, crear %SystemRoot%\wininit.ini y definir que archivos van a ser renombrados al reiniciar el S.O.

Saludos
Responder Con Cita