Skip to content

Commit

Permalink
Added VS2015 installed runtime reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ccw808 committed Jul 9, 2016
1 parent 7d89dfb commit c8ae5ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion MTA10/core/CVersionUpdater.cpp
Expand Up @@ -2030,7 +2030,7 @@ void CVersionUpdater::_DialogUpdateResult(void)
{
// 'files'/'silent' - Self extracting archive
SetOnQuitCommand ( "restart" );
SetOnRestartCommand ( "files", m_JobInfo.strSaveLocation );
SetOnRestartCommand ( "files", m_JobInfo.strSaveLocation, m_JobInfo.strParameters );
_PollAnyButton();
SetPostUpdateConnect( m_strServerSaysHost );
_ExitGame();
Expand Down Expand Up @@ -3177,6 +3177,14 @@ int CVersionUpdater::DoSendDownloadRequestToNextServer ( void )
}
}

// Get version of installed VS2015 runtime
SString strVS2015Version = "0";
SString strVS2015Install = GetSystemRegistryValue ( (uint)HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\DevDiv\\vc\\Servicing\\14.0\\RuntimeMinimum", "Install" );
if ( strVS2015Install == "\x01" )
{
strVS2015Version = GetSystemRegistryValue ( (uint)HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\DevDiv\\vc\\Servicing\\14.0\\RuntimeMinimum", "Version" );
}

// Compile some system stats
SDxStatus dxStatus;
g_pGraphics->GetRenderItemManager ()->GetDxStatus ( dxStatus );
Expand Down Expand Up @@ -3232,6 +3240,7 @@ int CVersionUpdater::DoSendDownloadRequestToNextServer ( void )
, *GetApplicationSetting ( "real-os-build" )
, *GetApplicationSetting ( "locale" ).Replace( "_", "-" )
, (uint)FileSize( PathJoin( GetSystemSystemPath(), "normaliz.dll" ) )
, *strVS2015Version
);

SString strConnectUsage = SString("%i_%i", GetApplicationSettingInt ( "times-connected-editor" ), GetApplicationSettingInt ( "times-connected" ) );
Expand Down
2 changes: 1 addition & 1 deletion MTA10/loader/Install.cpp
Expand Up @@ -295,7 +295,7 @@ SString CheckOnRestartCommand ( void )
{
// If extract failed and update file is an exe, try to run it
if ( ExtractExtension ( strFile ).CompareI ( "exe" ) )
ShellExecuteBlocking ( "open", strFile, "-s" );
ShellExecuteBlocking ( "open", strFile, strParameters.SplitRight( "###" ) );
}

// Stop progress bar
Expand Down

0 comments on commit c8ae5ee

Please sign in to comment.