|
WX Informatica: Criando Atalhos para a sua aplicação |
Iniciado por BOLLER, abr., 03 2019 1:25 PM - Sem resposta |
| |
| | | |
|
| |
Membro registado 3.657 mensagems Popularité : +175 (223 votes) |
|
Publicado em abril, 03 2019 - 1:25 PM |
CreateShortcuts()
sShortcut_Name is string = "Ranna" sShortcut_Command is string = "C:\Projeto\Ranna.exe"
IF fDirectoryExist("C:\Temp\") = False fMakeDir("C:\Temp\") END
IF fFileExist("C:\Temp\Ranna.exe") = False fCopyFile(fCurrentDir()+"\Ranna.exe","C:\Temp\Ranna.exe") END
RegistrySetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\", sShortcut_Name, sShortcut_Command)
IF CreateShortCut(shortcutStart, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) END
IF CreateShortCut(shortcutStartup, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) END
IF CreateShortCut(shortcutUserDesktop, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) END
IF CreateShortCut(shortcutProgram, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) END
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 99949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.com.br/ |
| |
| |
| | | |
|
| | | | |
| | |
|