Skip to content

Instantly share code, notes, and snippets.

@Kasiwagi-Thermit
Last active April 23, 2016 19:37

Revisions

  1. Kasiwagi-Thermit revised this gist Apr 23, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion NtfsDisableLastAccessUpdate-Enabler.c
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ int main(void)
    fp=fopen(b,"w");
    fprintf(fp,"@echo off\n");
    fprintf(fp,"set ValueName=NtfsDisableLastAccessUpdate\n");
    fprintf(fp,"for /f \"tokens=1,2*\" %%%%i in ( \'reg query \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"%ValueName%\"\' ) DO ( if \"%%%%i\"==\"%%ValueName%%\" ( set Value=%%%%k ))\n");
    fprintf(fp,"for /f \"tokens=1,2*\" %%%%i in ( \'reg query \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"%%ValueName%%\"\' ) DO ( if \"%%%%i\"==\"%%ValueName%%\" ( set Value=%%%%k ))\n");
    fprintf(fp,"exit /b %%Value:~2,3%%");
    fclose(fp);
    _fullpath(a,b,128);
  2. Kasiwagi-Thermit revised this gist Apr 23, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions NtfsDisableLastAccessUpdate-Enabler.c
    Original file line number Diff line number Diff line change
    @@ -23,8 +23,8 @@ int main(void)
    fp=fopen(b,"w");
    fprintf(fp,"@echo off\n");
    fprintf(fp,"set ValueName=NtfsDisableLastAccessUpdate\n");
    fprintf(fp,"for /f \"tokens=1,2*\" %%%%i\ in ( \'reg query \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"%ValueName%\"\' ) DO ( if \"%%i\"==\"%ValueName%\" ( set Value=%%k ))\n");
    fprintf(fp,"exit /b %Value:~2,3%");
    fprintf(fp,"for /f \"tokens=1,2*\" %%%%i in ( \'reg query \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"%ValueName%\"\' ) DO ( if \"%%%%i\"==\"%%ValueName%%\" ( set Value=%%%%k ))\n");
    fprintf(fp,"exit /b %%Value:~2,3%%");
    fclose(fp);
    _fullpath(a,b,128);
    l2:Sleep(10000);
  3. Kasiwagi-Thermit created this gist Apr 23, 2016.
    50 changes: 50 additions & 0 deletions NtfsDisableLastAccessUpdate-Enabler.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    #include <stdio.h>
    #include <stdlib.h>
    #include <windows.h>

    int main(void)
    {
    HWND KTITL,NTITL=NULL;
    DWORD i=0;
    HANDLE h;
    FILE *fp;
    int j;
    char a[256],b[24];
    SetConsoleTitle("NtfsDisableLastAccessUpdate-Enabler");
    Sleep(100);
    KTITL=FindWindow(NULL,"NtfsDisableLastAccessUpdate-Enabler");
    ShowWindow(KTITL,i);
    l1:Sleep(10000);
    NTITL=FindWindow(NULL,"Phantasy Star Online 2");
    if(NTITL!=NULL)
    {
    srand(time(NULL));
    sprintf(b,"%d%d.bat",rand(),rand());
    fp=fopen(b,"w");
    fprintf(fp,"@echo off\n");
    fprintf(fp,"set ValueName=NtfsDisableLastAccessUpdate\n");
    fprintf(fp,"for /f \"tokens=1,2*\" %%%%i\ in ( \'reg query \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"%ValueName%\"\' ) DO ( if \"%%i\"==\"%ValueName%\" ( set Value=%%k ))\n");
    fprintf(fp,"exit /b %Value:~2,3%");
    fclose(fp);
    _fullpath(a,b,128);
    l2:Sleep(10000);
    j=system(a);
    if(j==0)
    {
    system("reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem\" /v \"NtfsDisableLastAccessUpdate\" /t REG_DWORD /d 1 /f > nul");
    remove(a);
    l3:Sleep(10000);
    if(FindWindow(NULL,"Phantasy Star Online 2")!=NULL)
    {
    goto l3;
    }
    if(FindWindow(NULL,"Phantasy Star Online 2")==NULL)
    {
    goto l1;
    }
    }
    goto l2;
    }
    goto l1;
    return 0;
    }