diff --git a/setup/Setup.cpp b/setup/Setup.cpp index c42c8c4ca..6053457e8 100755 --- a/setup/Setup.cpp +++ b/setup/Setup.cpp @@ -2053,7 +2053,7 @@ bool CampoSetup::CreateAutostartMode(const int iSrvAutostartMode, const wxString //link nella cartella esecuzione automatica case 1: { - CreateIcon(CSIDL_COMMON_STARTUP, strPath); + CreateIcon(CSIDL_COMMON_STARTUP, strExe); } break; default: @@ -2068,9 +2068,9 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile) co { //csidl = CSIDL_COMMON_DESKTOPDIRECTORY = desktop //csidl = CSIDL_COMMON_STARTUP = all users esecuzione automatica - wxString szDesktopPath = GetFolderPath(csidl); + wxString strDesktopPath = GetFolderPath(csidl); - if (!szDesktopPath.IsEmpty()) + if (!strDesktopPath.IsEmpty()) { CoInitialize(NULL); @@ -2092,7 +2092,12 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile) co if (SUCCEEDED(hres)) { - wxFileName strLnk(szDesktopPath, wxT("Campo.lnk")); + wxFileName strLnk; + if (csidl == CSIDL_COMMON_STARTUP) + strLnk.Assign(strDesktopPath, wxT("Lurch.lnk")); + else + strLnk.Assign(strDesktopPath, wxT("Campo.lnk")); + // Save the link by calling IPersistFile::Save. wxString stringa = strLnk.GetFullPath(); wchar_t buff[_MAX_PATH]; @@ -2120,10 +2125,14 @@ void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e)) const wxString& strDest = pWizard->GetPrgLocPath(); const wxFileName strExe(strDest, wxT("ba0.exe")); + + //creazione dell'icona sul desktop const bool bDesktopShortcut = pWizard->GetDesktopShortcut(); if (bDesktopShortcut) CreateIcon(CSIDL_COMMON_DESKTOPDIRECTORY, strExe); - + + //copia del contenuto della cartella campo nella cartella di destinazione + //solo se installa campo server const unsigned int uInstallationType = pWizard->GetInstallationType(); //se sta installando campo in postazione server e deve installare un gestore di servizi