Advertisement
Guest User

Untitled

a guest
Jul 16th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.99 KB | None | 0 0
  1.  
  2. ------------------------------------------------|||====
  3.  function Sloock_db()
  4.   sHandl = Application.GetWndHandle()
  5.   DLL.CallFunction(_SystemFolder .. "\\User32.dll", "SetClassLongA", sHandl..",-26,"..131072, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
  6.   Window.SetSize(Application.GetWndHandle(), 560, 200);
  7.   Window.SetPos(Application.GetWndHandle(), Window.GetPos(Application.GetWndHandle()).X, Window.GetPos(Application.GetWndHandle()).Y+200);
  8.   Image.SetPos("logo", 315, 67);
  9. end
  10.  
  11. function c_Check()
  12.  if (eChec == 0) then
  13.    Image.Load("ck1", "AutoPlay\\Images\\1011.png");
  14.    Paragraph.SetProperties("install", {BGColor=Math.HexColorToNumber("A0ACBB")});
  15.    Paragraph.SetEnabled("install", false);
  16.    eChec=1
  17.    else
  18.    Image.Load("ck1", "AutoPlay\\Images\\1010.png");
  19.    Paragraph.SetProperties("install", {BGColor=Math.HexColorToNumber("465364")});
  20.    Paragraph.SetEnabled("install", true);
  21.    eChec=0
  22.    end
  23.    end
  24.    
  25. function s_Check()
  26.    if (sChec == 0) then
  27.    Image.Load("ck2", "AutoPlay\\Images\\1011.png");
  28.    sChec=1
  29.    else
  30.    Image.Load("ck2", "AutoPlay\\Images\\1010.png");
  31.    sChec=0
  32.    end
  33. end
  34.  
  35. mpos=315
  36. opt=0
  37. prog=0
  38. traf=255
  39.  
  40. function e_animation(e_ID)
  41.  
  42. if e_ID == 001 then
  43.  mpos=mpos-2
  44.  opt=opt+3
  45.    Image.SetPos("logo", mpos, 67);
  46.     Image.SetOpacity("name", opt/3-15);
  47.      Image.SetOpacity("layt", opt/3-15);
  48.    
  49.     if mpos < 41 then
  50.      Page.StopTimer(001);
  51.      Application.Sleep(100)
  52.      Window.SetPos(Application.GetWndHandle(), Window.GetPos(Application.GetWndHandle()).X, Window.GetPos(Application.GetWndHandle()).Y-200);
  53.      Window.SetSize(Application.GetWndHandle(), 560, 622);
  54.      RichText.ScrollLines("licence", 1);
  55.       end
  56.       end
  57.    
  58.    if e_ID == 002 then
  59.     prog=prog+2
  60.     Paragraph.SetSize("progree", prog, 200);
  61.    
  62.    if prog > 560 then
  63.      Page.StopTimer(002)
  64.      Install();
  65.      Page.StartTimer(10, 003)
  66.      end
  67.     end
  68.    
  69.   if e_ID == 003 then
  70.   traf=traf-1
  71.     WinApi.SetWindowTrans(Application.GetWndHandle(), traf);
  72.    
  73.     if traf < 150 then
  74.      Page.StopTimer(003)
  75.      Window.Close(Application.GetWndHandle(), CLOSEWND_SENDMESSAGE);
  76.      end
  77.    end
  78. end
  79.  
  80. function e_Install()
  81.   Window.SetSize(Application.GetWndHandle(), 560, 200);
  82.   Window.SetPos(Application.GetWndHandle(), Window.GetPos(Application.GetWndHandle()).X, Window.GetPos(Application.GetWndHandle()).Y+200);
  83.   Page.StartTimer(10, 002);
  84.  end
  85.  
  86.  
  87. function Install()
  88.  
  89. e_Folder = Input.GetText("local");
  90.  
  91.     File.Run("taskkill", ' /F /IM "'.._myApps..'.exe"', "", SW_HIDE, true);
  92.     Folder.Create(e_Folder.._myFolderApp);
  93.     File.Copy(_SourceFolder .. "\\Install\\*.*", e_Folder.._myFolderApp, true, true, false, true, nil);
  94.  
  95. sP = System.EnumerateProcesses();
  96.  
  97. for j, file_path in pairs(sP) do
  98.  
  99.     file = String.SplitPath(file_path);
  100.     if file.Filename..file.Extension == "Installer.exe" then
  101.        File.Copy(file_path, e_Folder.._myFolderApp.."\\Uninstall.exe")
  102.     end
  103. end
  104.  
  105. if (sChec == 0) then
  106.     Shell.CreateShortcut(_DesktopFolder, _myFolderApp, e_Folder.._myFolderApp.."\\".._myApps..".exe", "", "", e_Folder.._myFolderApp.."\\".._myApps..".exe", 0, SW_SHOWNORMAL, nil, "");
  107.     end
  108.    
  109.     Folder.Create(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp);
  110.     Shell.CreateShortcut(e_Folder.._myFolderApp.."\\", "Uninstall", e_Folder.._myFolderApp.."\\Uninstall.exe", "/Uninstall", "", e_Folder.._myFolderApp.."\\Uninstall.exe", 0, SW_SHOWNORMAL, nil, "");
  111.     Shell.CreateShortcut(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp, _myFolderApp, _ProgramFilesFolder .. "\\Dindroid".."\\".._myFolderApp.."\\".._myApps..".exe", "", "", e_Folder.._myFolderApp.."\\".._myApps..".exe", 0, SW_SHOWNORMAL, nil, _myFolderApp.." - dindroid.com");
  112.     Shell.CreateShortcut(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp, "Ajuda", "https://www.dindroid.com/", "https://www.dindroid.com/", "", e_Folder.._myFolderApp.."\\Uninstall.exe", 0, SW_SHOWNORMAL, nil, "https://dindroid.com");
  113.     Shell.CreateShortcut(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp, "Uninstall", e_Folder.._myFolderApp.."\\Uninstall.exe", "/Uninstall", "", e_Folder.._myFolderApp.."\\Uninstall.exe", 0, SW_SHOWNORMAL, nil, "");
  114.     Regystre_Din();
  115.    end
  116.    
  117.    function Regystre_Din()
  118.    fileName = _myFolderApp
  119.    Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName);
  120.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "DisplayName", fileName, REG_SZ);
  121.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "UninstallString", e_Folder..fileName.."\\Uninstall.exe /Uninstall", REG_SZ);
  122.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "Publisher", "Anderson M Santos - Dindroid", REG_SZ);
  123.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", e_Folder..fileName, REG_SZ);
  124.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "VersionMajor", "00000005", REG_DWORD);
  125.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "VersionMinor", "0000004c", REG_DWORD);
  126.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "EstimatedSize", "16765", REG_DWORD);
  127.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "DisplayVersion", File.GetVersionInfo(e_Folder..fileName.."\\".._myApps..".exe").ProductVersion, REG_SZ);
  128.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "LanguageString", "pt_BR", REG_SZ);
  129.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallDate", System.GetDate(DATE_FMT_ISO), REG_SZ);
  130.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallTime", System.GetTime(TIME_FMT_AMPM), REG_SZ);
  131.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "URLInfoAbout", "https://www.dindroid.com", REG_SZ);
  132.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "URLUpdateInfo", "https://www.dindroid.com/".._myApps, REG_SZ);
  133.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "HelpLink", "https://www.facebook.com/Dindroid123", REG_SZ);
  134.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "DisplayIcon", e_Folder..fileName.."\\".._myApps..".exe, 0", REG_SZ);
  135.    
  136.    Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName);
  137.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "AppDir", e_Folder..fileName.."\\", REG_SZ);
  138.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "startupLocaleID", "pt_br", REG_SZ);
  139.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "UiSurvey", "0", REG_DWORD);
  140.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "Upgrade", "Yes", REG_SZ);
  141.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "ref", "dindroid", REG_SZ);
  142.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "isDefragMemory", "0", REG_DWORD);
  143.    Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "date_ime", System.GetDate(DATE_FMT_EUROPE).." - "..System.GetTime(TIME_FMT_MIL), REG_SZ);
  144.    end;
  145.    
  146. fileName = _myFolderApp
  147.    
  148.     function Unistall()
  149.       if (_CommandLineArgs[1] == "/Uninstall") then
  150.       s_Foldert = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", true);
  151.            
  152.          if File.DoesExist(_TempFolder .. "\\Uninstall.exe") == false then
  153.             File.Copy(s_Foldert.."\\Uninstall.exe", _TempFolder .. "\\");
  154.             File.Run(_TempFolder .. "\\Uninstall.exe", "/Uninstall", _TempFolder);
  155.             Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
  156.             else
  157.              if Dialog.Message(_myFolderApp, "Tem certeza que deseja remover o ".._myApps.." e seus arquivos por completo do seu computador?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON3) == 6 then
  158.             s_Foldert = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", true);
  159.            
  160.             Folder.DeleteTree(s_Foldert, nil);
  161.             Folder.DeleteTree(Shell.GetFolder(SHF_APPLICATIONDATA_COMMON) .. "\\".._myFolderApp, nil);
  162.             Folder.DeleteTree(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp, nil);
  163.             Folder.DeleteTree(Shell.GetFolder(SHF_APPLICATIONDATA).."\\".._myFolderApp, nil);
  164.             Registry.DeleteKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\".._myFolderApp);
  165.             Registry.DeleteKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\".._myFolderApp);
  166.             File.Delete(_DesktopFolder.."\\".._myFolderApp..".lnk", true, false, true, nil)
  167.             Shell.DeleteShortcut(_DesktopFolder, _myFolderApp);
  168.             File.DeleteOnReboot(_TempFolder .. "\\Uninstall.exe");
  169.             end
  170.             if (File.DoesExist(s_Foldert.."\\Uninstall.exe") == false) then
  171.             Dialog.Message("Agradecimento", "Esperamos que nosso tempo juntos tenha sido muito bom e esperamos vĂȘ-lo novamente! :)", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
  172.             File.OpenURL("https://www.dindroid.com/", SW_SHOWNORMAL);
  173.             end
  174.             Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
  175.             end
  176.         end
  177.      end
  178.  
  179.   function Mastrd()
  180.  
  181.   s_Foldert = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", true);
  182.   Unistall()
  183.  
  184.   if _CommandLineArgs[1] == "/S" or _CommandLineArgs[1] == "/s" then
  185.     netD ="1"
  186.     Install()
  187.     Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
  188.     end
  189.    
  190.     if _CommandLineArgs[1] == "/?" then
  191.     Dialog.Message("..:: Installer - "..fileName.." ::..", "Ussage <command> [/?] [Command list]\r\n\r\n\r\nCommands /S silent install\r\nCommands /R Complete program removal\r\n\r\nSimple:\r\nInstaller.exe /?\r\nInstaller.exe /S\r\nInstaller.exe /R\r\n\r\nhttps://www.dindroid.com/ or WhatsApp +55 011 97399-5031", MB_OK, MB_ICONINFORMATION)
  192.     Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
  193.     end
  194.    
  195.     if _CommandLineArgs[1] == "/R" or _CommandLineArgs[1] == "/r" then
  196.      Shell.Execute(s_Foldert.."\\Uninstall.exe", "open", " /Uninstall", _TempFolder, SW_SHOWNORMAL, true);
  197.      Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
  198.      end
  199.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement