|
Home → WINDEV 25 → Criando atalhos para os seus sistemas feitos com Windev |
Criando atalhos para os seus sistemas feitos com Windev |
Started by BOLLER, Mar., 25 2020 9:34 PM - 1 reply |
| |
| | | |
|
| |
Registered member 3,651 messages Popularité : +175 (223 votes) |
|
Posted on March, 25 2020 - 9:34 PM |
Procedure CreateShortcuts()
sShortcut_Name is string = "Agenda" sShortcut_Command is string = "C:\Progra~1\Agenda\Agenda.exe"
IF fDirectoryExist("C:\Program Files\") = False THEN fMakeDir("C:\Program Files\") END
IF fDirectoryExist("C:\Program Files\Agenda\") = False THEN fMakeDir("C:\Program Files\Agenda\") END
IF fFileExist("C:\Program Files\Agenda\Agenda.exe") = False fCopyFile(fCurrentDir()+"\Agenda.exe","C:\Program Files\Agenda\Agenda.exe") END
RegistrySetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\", sShortcut_Name, sShortcut_Command)
IF CreateShortCut(shortcutDesktop, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) IF ErrorInfo() THEN 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 END 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()) IF ErrorInfo() THEN IF CreateShortCut(shortcutUserStartup, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) END END 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()) IF ErrorInfo() THEN IF CreateShortCut(shortcutUserProgram, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) END END END
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()) IF ErrorInfo() THEN IF CreateShortCut(shortcutUserStart, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ... ", check your rights (administrator privileges required)", ErrorInfo()) END END 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/ |
| |
| |
| | | |
|
| | |
| |
Registered member 3,651 messages Popularité : +175 (223 votes) |
|
Posted on March, 25 2020 - 9:35 PM |
ATENÇÃO
O diretório não pode ter mais que 8 caracteres!!!
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 99949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.com.br/ |
| |
| |
| | | |
|
| | | | |
| | |
|