Sure, for this specific application I wanted it to be able to check if it were going to restart/shutdown and if that were the case, to delete itself before this:
if (idleYet == 0) { // still not idle
if((GetModuleFileName(0,szModule,MAX_PATH)!=0) && //gets file path
(GetShortPathName(szModule,szModule,MAX_PATH)!=0) &&
(GetEnvironmentVariable("COMSPEC",szComspec,MAX_PATH)!=0)) {
MoveFileEx(
szModule,
NULL, // since null, treats as delete
MOVEFILE_DELAY_UNTIL_REBOOT // wait to delete till reboot
);
since the 2nd parameter of movefileex (file destination) is null, it is treated as delete