Corretta gestione protezione SSA.

Cambiato nome da "Setup.exe" a "SetCmpUp.exe" per evitare problemi di sicurezza di Windows 7

git-svn-id: svn://10.65.10.50/branches/R_10_00@22679 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-06-18 14:14:15 +00:00
parent 48d079a2c3
commit 6dfd0fd42b
6 changed files with 90 additions and 38 deletions

View File

@ -1452,11 +1452,11 @@ bool CampoSetup::CampoRunning() const
void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e)) void CampoSetup::OnTimer(wxTimerEvent& WXUNUSED(e))
{ {
//controllo di un eventuale setup già lanciato (tipico di utonti e della premiata ditta bibì & bibò) //controllo di un eventuale setup già lanciato (tipico di utonti e della premiata ditta bibì & bibò)
wxSingleInstanceChecker sicSetup("setup"); wxSingleInstanceChecker sicSetup("SetCmpUp");
if (sicSetup.IsAnotherRunning()) if (sicSetup.IsAnotherRunning())
{ {
wxString msg; wxString msg;
msg << "Una installazione di " << PRODUCT << " è già in esecuzione!"; msg << "Un'installazione di " << PRODUCT << " è già in esecuzione!";
ErrorBox(msg); ErrorBox(msg);
m_pMainFrame->Destroy(); m_pMainFrame->Destroy();
return; return;

View File

@ -112,15 +112,19 @@ MustCall=22-09-2011
[702] [702]
Owner=Itertec (Valentini) Owner=Itertec (Valentini)
OEM=7 OEM=7
MustCall=06-06-2012
[703] [703]
Owner=CIS informatica srl Owner=CIS informatica srl
OEM=7 OEM=7
MustCall=06-06-2012
[704] [704]
Owner=Itertec (TS Lazio) Owner=Itertec (TS Lazio)
OEM=7 OEM=7
MustCall=06-06-2012
[705] [705]
Owner=Itertec (TS Lazio) Owner=Itertec (TS Lazio)
OEM=7 OEM=7
MustCall=06-06-2012
[801] [801]
Owner=Salvatore Durante Owner=Salvatore Durante
OEM=8 OEM=8
@ -373,8 +377,7 @@ Owner=Istituto Santa Maria degli Angeli
OEM=1 OEM=1
[6024] [6024]
Owner=Centro Commerciale Z4 Owner=Centro Commerciale Z4
OEM=7 OEM=8
MustCall=22-09-2011
[6032] [6032]
*=31-12-2008 *=31-12-2008
Owner=FARO PLAST SNC DI ROSSI G.e C. Owner=FARO PLAST SNC DI ROSSI G.e C.
@ -703,6 +706,7 @@ OEM=0
[7055] [7055]
Owner=Laboratorio Casella Owner=Laboratorio Casella
OEM=7 OEM=7
MustCall=06-06-2012
[7061] [7061]
ps0872 -?=31-12-3000 ps0872 -?=31-12-3000
Owner=Realplast Owner=Realplast
@ -714,6 +718,7 @@ MustCall=22-09-2011
[7066] [7066]
Owner=Pomezia Avvolgibili srl Owner=Pomezia Avvolgibili srl
OEM=7 OEM=7
MustCall=06-06-2012
[7074] [7074]
Owner=A.C.F. SRL Owner=A.C.F. SRL
[7079] [7079]
@ -870,6 +875,7 @@ OEM=1
[7232] [7232]
Owner=Impresa Giardino Srl Owner=Impresa Giardino Srl
OEM=7 OEM=7
MustCall=06-06-2012
[7241] [7241]
Owner=Minigomme Owner=Minigomme
OEM=1 OEM=1
@ -975,6 +981,7 @@ MustCall=22-09-2011
[7338] [7338]
Owner=Video Star srl Owner=Video Star srl
OEM=7 OEM=7
MustCall=06-06-2012
[7346] [7346]
Owner=PRODUS SNC DI STILO e C. Owner=PRODUS SNC DI STILO e C.
OEM=1 OEM=1
@ -1009,6 +1016,7 @@ OEM=1
[7393] [7393]
Owner=C.S.R. SRL Owner=C.S.R. SRL
OEM=1 OEM=1
MustCall=30-06-2012
[7394] [7394]
Owner=TRATTORIA PEPPINO SRL Owner=TRATTORIA PEPPINO SRL
OEM=1 OEM=1
@ -1033,6 +1041,7 @@ OEM=1
[7414] [7414]
Owner=Fincapital Owner=Fincapital
OEM=7 OEM=7
MustCall=06-06-2012
[7417] [7417]
Owner=Prassi Roma s.r.l. Owner=Prassi Roma s.r.l.
OEM=7 OEM=7
@ -1101,6 +1110,7 @@ OEM=1
[7531] [7531]
Owner=MAV Television srl Owner=MAV Television srl
OEM=7 OEM=7
MustCall=06-06-2012
[7535] [7535]
*=31-12-2010 *=31-12-2010
Owner=RB Trucks Owner=RB Trucks
@ -1162,6 +1172,7 @@ MustCall=22-09-2011
[7612] [7612]
Owner=Gentile Legnami srl Owner=Gentile Legnami srl
OEM=7 OEM=7
MustCall=06-06-2012
[7618] [7618]
Owner=ISONORD SOC.COOP.A.R.L. Owner=ISONORD SOC.COOP.A.R.L.
OEM=1 OEM=1
@ -1258,6 +1269,7 @@ OEM=0
[7756] [7756]
Owner=Samadi Owner=Samadi
OEM=7 OEM=7
MustCall=06-06-2012
[7762] [7762]
Owner=Studio la calamita Owner=Studio la calamita
OEM=0 OEM=0
@ -2070,6 +2082,9 @@ OEM=0
[8491] [8491]
Owner=FERT Company di Brevini Mauro Owner=FERT Company di Brevini Mauro
OEM=0 OEM=0
[8498]
Owner=Gam Oil & Gas spa
OEM=8
[8499] [8499]
Owner=HCM Owner=HCM
OEM=8 OEM=8
@ -2137,9 +2152,11 @@ OEM=0
[8537] [8537]
Owner=A.R.S. Progetti s.p.a. Owner=A.R.S. Progetti s.p.a.
OEM=7 OEM=7
MustCall=06-06-2012
[8538] [8538]
Owner=A.R.S. Progetti s.p.a. Owner=A.R.S. Progetti s.p.a.
OEM=7 OEM=7
MustCall=06-06-2012
[8542] [8542]
ps1001 -?=31-12-3000 ps1001 -?=31-12-3000
ps0017 -0=31-12-3000 ps0017 -0=31-12-3000
@ -2158,9 +2175,11 @@ MustCall=31-12-2011
[8546] [8546]
Owner=Extra Owner=Extra
OEM=7 OEM=7
MustCall=06-06-2012
[8550] [8550]
Owner=Carla srl Owner=Carla srl
OEM=7 OEM=7
MustCall=06-06-2012
[8552] [8552]
*=01-04-2011 *=01-04-2011
Owner=Aspirnova 2000 Owner=Aspirnova 2000
@ -2402,6 +2421,7 @@ MustCall=22-09-2011
[8654] [8654]
Owner=Laboratorio di Patologia Clinica Brusca s.r.l. Owner=Laboratorio di Patologia Clinica Brusca s.r.l.
OEM=7 OEM=7
MustCall=06-06-2012
[8655] [8655]
Owner=Gridi srl Owner=Gridi srl
OEM=7 OEM=7
@ -2413,6 +2433,7 @@ MustCall=22-09-2011
[8657] [8657]
Owner=Pomezia Avvolgibili srl Owner=Pomezia Avvolgibili srl
OEM=7 OEM=7
MustCall=06-06-2012
[8658] [8658]
ps0330 -?=31-12-3000 ps0330 -?=31-12-3000
Owner=Model Assistance Owner=Model Assistance
@ -2445,6 +2466,7 @@ MustCall=22-09-2011
[8666] [8666]
Owner=Soc. Iniziative Immobiliari 2002 s.r.l. Owner=Soc. Iniziative Immobiliari 2002 s.r.l.
OEM=7 OEM=7
MustCall=06-06-2012
[8668] [8668]
*=22-09-2011 *=22-09-2011
Owner=Smile Production srl Owner=Smile Production srl
@ -2655,6 +2677,7 @@ MustCall=22-09-2011
[8750] [8750]
Owner=Samadi Owner=Samadi
OEM=7 OEM=7
MustCall=06-06-2012
[8751] [8751]
Owner=Federmeccanica Owner=Federmeccanica
OEM=7 OEM=7
@ -2662,11 +2685,13 @@ MustCall=22-09-2011
[8752] [8752]
Owner=Samadi Owner=Samadi
OEM=7 OEM=7
MustCall=06-06-2012
[8753] [8753]
OEM=1 OEM=1
[8755] [8755]
Owner=ALSEMA srl Owner=ALSEMA srl
OEM=7 OEM=7
MustCall=06-06-2012
[8760] [8760]
Owner=Acquacontrol Automazioni srl Owner=Acquacontrol Automazioni srl
OEM=3 OEM=3
@ -2851,10 +2876,10 @@ Owner=Global Impianti
OEM=0 OEM=0
[8826] [8826]
Owner=RAPEL DI PULVIRENTI LEONILDE SAS Owner=RAPEL DI PULVIRENTI LEONILDE SAS
OEM=7 OEM=8
[8827] [8827]
Owner=Petrone Logistica Owner=Petrone Logistica
OEM=7 OEM=8
[8830] [8830]
Owner=Fasmico Owner=Fasmico
OEM=8 OEM=8
@ -3183,12 +3208,15 @@ OEM=1
[8946] [8946]
Owner=Iniziativa Immobiliare 2001 srl Owner=Iniziativa Immobiliare 2001 srl
OEM=7 OEM=7
MustCall=06-06-2012
[8947] [8947]
Owner=Gentile Legnami srl Owner=Gentile Legnami srl
OEM=7 OEM=7
MustCall=06-06-2012
[8948] [8948]
Owner=ALSEMA srl Owner=ALSEMA srl
OEM=7 OEM=7
MustCall=06-06-2012
[8952] [8952]
Owner=CAST Alimenti srl Owner=CAST Alimenti srl
OEM=1 OEM=1
@ -3310,6 +3338,15 @@ OEM=1
[9008] [9008]
Owner=New Life Owner=New Life
OEM=1 OEM=1
[9009]
Owner=CO.MA.RI.
OEM=1
[9015]
Owner=FICEM SRL
OEM=1
[9019]
Owner=CFR s.a.s
OEM=1
[9020] [9020]
Owner=G.G. Trasporti s.r.l. Owner=G.G. Trasporti s.r.l.
OEM=1 OEM=1

View File

@ -2,8 +2,8 @@
// Microsoft Visual C++ generated include file. // Microsoft Visual C++ generated include file.
// Used by Setup.rc // Used by Setup.rc
// //
#define IDI_ICON1 101 //#define IDI_ICON1 101
#define IDI_ICON 101 //#define IDI_ICON 101
// Next default values for new objects // Next default values for new objects
// //

View File

@ -34,6 +34,7 @@ int GetSessionId()
#define WVISTASTR _T("Windows Vista") #define WVISTASTR _T("Windows Vista")
#define W2008STR _T("Windows Server 2008") #define W2008STR _T("Windows Server 2008")
#define W7STR _T("Windows 7") #define W7STR _T("Windows 7")
#define W8STR _T("Windows 8")
#define WCESTR _T("Windows CE") #define WCESTR _T("Windows CE")
@ -111,27 +112,24 @@ bool GetWinVer(LPTSTR lpszVersion, int nVersionSize, int *pnVersion)
{ {
case 0: cp = W2KSTR; nVersion = W2K; break; case 0: cp = W2KSTR; nVersion = W2K; break;
case 1: cp = WXPSTR; nVersion = WXP; break; case 1: cp = WXPSTR; nVersion = WXP; break;
case 2:
default: cp = W2003STR; nVersion = W2003; break; default: cp = W2003STR; nVersion = W2003; break;
} }
} }
else if (dwMajorVersion == 6) else if (dwMajorVersion == 6)
{ {
cp = WVISTASTR; switch (dwMinorVersion)
nVersion = WVISTA; {
// TBI: Windows 2008 Server case 0: cp = WVISTASTR; nVersion = WVISTA; break;
} case 1: cp = W7STR; nVersion = W7; break;
else if (dwMajorVersion >= 7) default: cp = W8STR; nVersion = W8; break;
}
}
else if (dwMajorVersion > 6) // ???
{ {
cp = W7STR; cp = W8STR;
nVersion = W7; nVersion = W8;
} }
} }
/* else if (dwPlatformId == VER_PLATFORM_WIN32_CE)
{
cp = WCESTR;
nVersion = WCE;
}*/
} }
if (lpszVersion != NULL && nVersionSize > 0) if (lpszVersion != NULL && nVersionSize > 0)
@ -145,13 +143,20 @@ bool GetWinVer(LPTSTR lpszVersion, int nVersionSize, int *pnVersion)
wxString GetWindowsProgramDirectory() wxString GetWindowsProgramDirectory()
{ {
//scelta della directory di installazione di default //scelta della directory di installazione di default
#ifdef WIN32 TCHAR strFolder[MAX_PATH];
TCHAR strFolder[MAX_PATH]; ::SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, SHGFP_TYPE_CURRENT, strFolder);
::SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, SHGFP_TYPE_CURRENT, strFolder); return strFolder;
return strFolder;
#endif
} }
wxString GetWindowsDesktopDirectory()
{
//scelta della directory di installazione di default
TCHAR strFolder[MAX_PATH];
::SHGetFolderPath(NULL, CSIDL_DESKTOPDIRECTORY, NULL, SHGFP_TYPE_CURRENT, strFolder);
return strFolder;
}
wxString GetDefaultDestination() wxString GetDefaultDestination()
{ {
wxString strDest; wxString strDest;
@ -271,7 +276,6 @@ size_t ListNetworkDisks(wxArrayString& asList)
//metodo per avere un array con la lista dei path delle condivisioni locali //metodo per avere un array con la lista dei path delle condivisioni locali
size_t ListSharedDirectories(wxArrayString& asList) size_t ListSharedDirectories(wxArrayString& asList)
{ {
#ifdef WIN32
NET_API_STATUS res = ERROR_MORE_DATA; NET_API_STATUS res = ERROR_MORE_DATA;
while (res == ERROR_MORE_DATA) while (res == ERROR_MORE_DATA)
@ -293,7 +297,6 @@ size_t ListSharedDirectories(wxArrayString& asList)
NetApiBufferFree(shi); NetApiBufferFree(shi);
} //if(res ==... } //if(res ==...
} //while (res==ERROR_MORE_DATA... } //while (res==ERROR_MORE_DATA...
#endif
return asList.GetCount(); return asList.GetCount();
} }

View File

@ -58,6 +58,7 @@ public:
#define WVISTA 106 #define WVISTA 106
#define W2008 107 #define W2008 107
#define W7 108 #define W7 108
#define W8 109
#define WNTLAST 199 #define WNTLAST 199
#define WCEFIRST 201 #define WCEFIRST 201
@ -79,6 +80,7 @@ void NormalizeSlash(wxString& strFileName);
//interfaccia con windows //interfaccia con windows
wxString GetWindowsProgramDirectory(); wxString GetWindowsProgramDirectory();
wxString GetWindowsDesktopDirectory();
int GetSessionId(); int GetSessionId();
bool GetWinVer(LPTSTR lpszVersion, int nVersionSize, int *pnVersion); bool GetWinVer(LPTSTR lpszVersion, int nVersionSize, int *pnVersion);

View File

@ -678,17 +678,26 @@ void CampoWizardPage4::OnSRPick(wxCommandEvent& e)
void CampoWizardPage4::OnSSAPick(wxCommandEvent& e) void CampoWizardPage4::OnSSAPick(wxCommandEvent& e)
{ {
wxString strSerial; wxString strSerial;
strSerial = ::wxGetTextFromUser(_T("Inserire il numero di serie assegnato da Sirio"), _T("Richiesta numero di serie"), strSerial, this); strSerial = ::wxGetTextFromUser(_T("Inserire il numero di serie assegnato da Sirio"),
_T("Richiesta numero di serie"), strSerial, this);
const int nSerial = wxAtoi(strSerial); const int nSerial = wxAtoi(strSerial);
if (nSerial > 1000 && nSerial < 10000) if (nSerial > 1000 && nSerial < 10000)
{ {
wxString path("./SSAGetInfo.exe -nome c:/"); wxString ssax = GetWindowsDesktopDirectory();
path << strSerial; ssax += "\\";
ssax += strSerial;
wxString path("./SSAGetInfo.exe -nome ");
path += ssax;
wxExecute(path, wxEXEC_SYNC); wxExecute(path, wxEXEC_SYNC);
strSerial += wxT(".ssax");
if (wxFileName::FileExists(path)) ssax += wxT(".ssax");
if (wxFileName::FileExists(ssax))
{ {
wxString msg = _T("Spedire il file ") + strSerial + _(" a abilitazioni_software@sirio-is.it\nper ottenere il file della licenza da copiare nella cartella di installazione."); wxString msg = _T("Spedire il file ");
msg += ssax;
msg += _T(" ad abilitazioni_software@sirio-is.it\nper ottenere il file della licenza da copiare nella cartella ");
msg += GetWizard().GetPrgLocPath();
MessageBox(msg); MessageBox(msg);
} }
else else
@ -855,11 +864,12 @@ int CampoWizardPage4::DongleTest()
if (serno == 0xFFFF) if (serno == 0xFFFF)
{ {
wxString strSSA = wxFindFirstFile("c:\\*.ssax"); wxString strSSAX = GetWindowsDesktopDirectory();
if (!strSSA.IsEmpty()) strSSAX += "\\*.ssax";
strSSAX = wxFindFirstFile(strSSAX);
if (!strSSAX.IsEmpty())
{ {
strSSA = strSSA.After('\\'); serno = wxAtoi(strSSAX.AfterLast('\\'));
serno = wxAtoi(strSSA);
if (serno > 1000 && serno < 65000) if (serno > 1000 && serno < 65000)
dongle_type = 4; //chiave software dongle_type = 4; //chiave software
else else