IF ! Upper( oExeList[ 1, F_NAME ] ) == Upper( hb_FNameNameExt( hb_ProgName() ) )
IF "SJPA" $ Upper( hb_FNameNameExt( hb_ProgName() ) )
MsgStop( "ATENÇÃO URGENTE" + hb_Eol() + ;
"JPA.EXE com nome errado, entrando no lugar de SJPA.EXE" )
ENDIF
MsgStop( "JPA executado não é o JPA mais recente." + hb_Eol() + ;
"Tem alguma coisa errada na configuração e precisa ser corrigida" + hb_Eol() + ;
"Vai ser usado o JPA.EXE com data mais recente," + hb_Eol() + ;
"mas considere apenas quebra-galho." + hb_Eol() + ;
"Tentando criar atalho correto (fase experimental)" )
IF File( cPath + "sjpa.exe" )
oScript := win_OleCreateObject( "wscript.shell" )
oAtalho := oScript:CreateShortcut( oScript:SpecialFolders( "Desktop" ) + "\sjpa.lnk" )
oAtalho:WindowStyle := WIN_SW_SHOWNORMAL
oAtalho:IconLocation := cPath + "sjpa.exe"
oAtalho:TargetPath := cPath + "sjpa.exe"
oAtalho:WorkingDirectory := cPath
oAtalho:Save()
ENDIF
ShellExecuteOpen( cPath + oExeList[ 1, F_NAME ], cParam, hb_cwd(), SW_SHOWNORMAL )
QUIT
ENDIF
Anexos
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2) "The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell" https://github.com/JoseQuintas/
Como pode ver no atalho, indiquei o EXE, que possui ícone próprio, foi usado o ícone do aplicativo.
Lembrando também:
Eu uso o SJPA.EXE que sempre usa a versão mais nova do aplicativo.
Se não carregou a versào mais nova, é porque o atalho está errado, então crio atalho.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2) "The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell" https://github.com/JoseQuintas/