Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------|||====
- function Sloock_db()
- sHandl = Application.GetWndHandle()
- DLL.CallFunction(_SystemFolder .. "\\User32.dll", "SetClassLongA", sHandl..",-26,"..131072, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
- Window.SetSize(Application.GetWndHandle(), 560, 200);
- Window.SetPos(Application.GetWndHandle(), Window.GetPos(Application.GetWndHandle()).X, Window.GetPos(Application.GetWndHandle()).Y+200);
- Image.SetPos("logo", 315, 67);
- end
- function c_Check()
- if (eChec == 0) then
- Image.Load("ck1", "AutoPlay\\Images\\1011.png");
- Paragraph.SetProperties("install", {BGColor=Math.HexColorToNumber("A0ACBB")});
- Paragraph.SetEnabled("install", false);
- eChec=1
- else
- Image.Load("ck1", "AutoPlay\\Images\\1010.png");
- Paragraph.SetProperties("install", {BGColor=Math.HexColorToNumber("465364")});
- Paragraph.SetEnabled("install", true);
- eChec=0
- end
- end
- function s_Check()
- if (sChec == 0) then
- Image.Load("ck2", "AutoPlay\\Images\\1011.png");
- sChec=1
- else
- Image.Load("ck2", "AutoPlay\\Images\\1010.png");
- sChec=0
- end
- end
- mpos=315
- opt=0
- prog=0
- traf=255
- function e_animation(e_ID)
- if e_ID == 001 then
- mpos=mpos-2
- opt=opt+3
- Image.SetPos("logo", mpos, 67);
- Image.SetOpacity("name", opt/3-15);
- Image.SetOpacity("layt", opt/3-15);
- if mpos < 41 then
- Page.StopTimer(001);
- Application.Sleep(100)
- Window.SetPos(Application.GetWndHandle(), Window.GetPos(Application.GetWndHandle()).X, Window.GetPos(Application.GetWndHandle()).Y-200);
- Window.SetSize(Application.GetWndHandle(), 560, 622);
- RichText.ScrollLines("licence", 1);
- end
- end
- if e_ID == 002 then
- prog=prog+2
- Paragraph.SetSize("progree", prog, 200);
- if prog > 560 then
- Page.StopTimer(002)
- Install();
- Page.StartTimer(10, 003)
- end
- end
- if e_ID == 003 then
- traf=traf-1
- WinApi.SetWindowTrans(Application.GetWndHandle(), traf);
- if traf < 150 then
- Page.StopTimer(003)
- Window.Close(Application.GetWndHandle(), CLOSEWND_SENDMESSAGE);
- end
- end
- end
- function e_Install()
- Window.SetSize(Application.GetWndHandle(), 560, 200);
- Window.SetPos(Application.GetWndHandle(), Window.GetPos(Application.GetWndHandle()).X, Window.GetPos(Application.GetWndHandle()).Y+200);
- Page.StartTimer(10, 002);
- end
- function Install()
- e_Folder = Input.GetText("local");
- File.Run("taskkill", ' /F /IM "'.._myApps..'.exe"', "", SW_HIDE, true);
- Folder.Create(e_Folder.._myFolderApp);
- File.Copy(_SourceFolder .. "\\Install\\*.*", e_Folder.._myFolderApp, true, true, false, true, nil);
- sP = System.EnumerateProcesses();
- for j, file_path in pairs(sP) do
- file = String.SplitPath(file_path);
- if file.Filename..file.Extension == "Installer.exe" then
- File.Copy(file_path, e_Folder.._myFolderApp.."\\Uninstall.exe")
- end
- end
- if (sChec == 0) then
- Shell.CreateShortcut(_DesktopFolder, _myFolderApp, e_Folder.._myFolderApp.."\\".._myApps..".exe", "", "", e_Folder.._myFolderApp.."\\".._myApps..".exe", 0, SW_SHOWNORMAL, nil, "");
- end
- Folder.Create(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp);
- Shell.CreateShortcut(e_Folder.._myFolderApp.."\\", "Uninstall", e_Folder.._myFolderApp.."\\Uninstall.exe", "/Uninstall", "", e_Folder.._myFolderApp.."\\Uninstall.exe", 0, SW_SHOWNORMAL, nil, "");
- 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");
- 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");
- Shell.CreateShortcut(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp, "Uninstall", e_Folder.._myFolderApp.."\\Uninstall.exe", "/Uninstall", "", e_Folder.._myFolderApp.."\\Uninstall.exe", 0, SW_SHOWNORMAL, nil, "");
- Regystre_Din();
- end
- function Regystre_Din()
- fileName = _myFolderApp
- Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "DisplayName", fileName, REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "UninstallString", e_Folder..fileName.."\\Uninstall.exe /Uninstall", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "Publisher", "Anderson M Santos - Dindroid", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", e_Folder..fileName, REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "VersionMajor", "00000005", REG_DWORD);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "VersionMinor", "0000004c", REG_DWORD);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "EstimatedSize", "16765", REG_DWORD);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "DisplayVersion", File.GetVersionInfo(e_Folder..fileName.."\\".._myApps..".exe").ProductVersion, REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "LanguageString", "pt_BR", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallDate", System.GetDate(DATE_FMT_ISO), REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallTime", System.GetTime(TIME_FMT_AMPM), REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "URLInfoAbout", "https://www.dindroid.com", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "URLUpdateInfo", "https://www.dindroid.com/".._myApps, REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "HelpLink", "https://www.facebook.com/Dindroid123", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "DisplayIcon", e_Folder..fileName.."\\".._myApps..".exe, 0", REG_SZ);
- Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "AppDir", e_Folder..fileName.."\\", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "startupLocaleID", "pt_br", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "UiSurvey", "0", REG_DWORD);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "Upgrade", "Yes", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "ref", "dindroid", REG_SZ);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "isDefragMemory", "0", REG_DWORD);
- Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\"..fileName, "date_ime", System.GetDate(DATE_FMT_EUROPE).." - "..System.GetTime(TIME_FMT_MIL), REG_SZ);
- end;
- fileName = _myFolderApp
- function Unistall()
- if (_CommandLineArgs[1] == "/Uninstall") then
- s_Foldert = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", true);
- if File.DoesExist(_TempFolder .. "\\Uninstall.exe") == false then
- File.Copy(s_Foldert.."\\Uninstall.exe", _TempFolder .. "\\");
- File.Run(_TempFolder .. "\\Uninstall.exe", "/Uninstall", _TempFolder);
- Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
- else
- 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
- s_Foldert = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", true);
- Folder.DeleteTree(s_Foldert, nil);
- Folder.DeleteTree(Shell.GetFolder(SHF_APPLICATIONDATA_COMMON) .. "\\".._myFolderApp, nil);
- Folder.DeleteTree(Shell.GetFolder(SHF_STARTMENU).."\\".._myFolderApp, nil);
- Folder.DeleteTree(Shell.GetFolder(SHF_APPLICATIONDATA).."\\".._myFolderApp, nil);
- Registry.DeleteKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\".._myFolderApp);
- Registry.DeleteKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Dindroid\\".._myFolderApp);
- File.Delete(_DesktopFolder.."\\".._myFolderApp..".lnk", true, false, true, nil)
- Shell.DeleteShortcut(_DesktopFolder, _myFolderApp);
- File.DeleteOnReboot(_TempFolder .. "\\Uninstall.exe");
- end
- if (File.DoesExist(s_Foldert.."\\Uninstall.exe") == false) then
- Dialog.Message("Agradecimento", "Esperamos que nosso tempo juntos tenha sido muito bom e esperamos vĂȘ-lo novamente! :)", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
- File.OpenURL("https://www.dindroid.com/", SW_SHOWNORMAL);
- end
- Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
- end
- end
- end
- function Mastrd()
- s_Foldert = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"..fileName, "InstallLocation", true);
- Unistall()
- if _CommandLineArgs[1] == "/S" or _CommandLineArgs[1] == "/s" then
- netD ="1"
- Install()
- Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
- end
- if _CommandLineArgs[1] == "/?" then
- 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)
- Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
- end
- if _CommandLineArgs[1] == "/R" or _CommandLineArgs[1] == "/r" then
- Shell.Execute(s_Foldert.."\\Uninstall.exe", "open", " /Uninstall", _TempFolder, SW_SHOWNORMAL, true);
- Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement