|
Exemplo para criar um atalho |
Iniciado por Boller, 07,may. 2024 20:22 - No hay respuesta |
| |
| | | |
|
| |
Miembro registrado 4.521 mensajes |
|
Publicado el 07,mayo 2024 - 20:22 |
PROCEDURE CreateShortcuts()
gsProcedure = "CreateShortcuts"
//Trace("CreateShortcuts")
//CRIA O ATALHO NA TELA
sShortcut_Name is string = "Tarifador"
sShortcut_Path is string = fCurrentDir()+fSep()
sShortcut_Command is string = fCurrentDir()+fSep()+"Tarifador.exe"
//CreateShortCut()
IF Contains(sShortcut_Command,"\EXE\",IgnoreCase) = False IF fFileExist(sShortcut_Command) = True THEN //Criar Autorun no Registro RegistrySetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\", sShortcut_Name, sShortcut_Command) //C:\Users\ADRIANO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\
Usuario is string = Upper(NetworkUser())
sDirStartup is string = "C:\Users\"+NoSpace(Usuario)+"\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\" sDirMenu is string = "C:\Users\"+NoSpace(Usuario)+"\Microsoft\Windows\Start Menu\Programs"
IF fDirectoryExist(sDirStartup) = True THEN // trace(shortcutFree, // sShortcut_Name, // sShortcut_Command, // sShortcut_Path, // swsNormal, // "" , // sShortcut_Path, // sShortcut_Command) CreateShortCut(shortcutFree, sShortcut_Name, sShortcut_Command, sShortcut_Path, swsNormal, "" , sShortcut_Path, sShortcut_Command) IF fFileExist(sShortcut_Path+"tarifador.lnk") = True THEN link is string = sShortcut_Path+"tarifador.lnk" Info("ok",link,sDirStartup) fCopyFile(link,sDirMenu,frConfirm) fCopyFile(link,sDirStartup,frConfirm) END 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/ |
| |
| |
| | | |
|
| | | | |
| | |
|