Inno Setup and VC Redistributable and handling exit code 3010 gracefully - inno-setup

In my CurStepChanged procedure I have some code that installs the Visual Studio Redistributable (if required). Code snippet:
if (bVcRedist64BitNeeded) then
begin
if Exec(ExpandConstant(vcRedist64BitPath), '/install /passive /norestart', '',
SW_SHOW, ewWaitUntilTerminated, ResultCode) then begin
{ handle success if necessary; ResultCode contains the exit code }
Log('VS Redist (64 bit) installer exit code = ' + IntToStr(ResultCode));
if not (ResultCode = 0) then begin
MsgBox(ExpandConstant('{cm:InstallFailed,Visual Studio x64 Redistributable}'), mbInformation, MB_OK);
Abort();
end;
end
else begin
{ The execution failed for some reason }
Log('VS Redist (64 bit) installer exit code = ' + IntToStr(ResultCode));
MsgBox(SysErrorMessage(ResultCode), mbInformation, MB_OK);
Abort();
end;
end;
I had a user saying that the installer for my software was failing so I asked them to send me their logs. At the end of all the logs it had similar to this:
2020-09-05 14:37:48.034 VS Redist (64 bit) installer exit code = 3010
2020-09-05 14:37:48.035 Message box (OK):
The installation of Visual Studio x64 Redistributable failed. The Meeting Schedule Assistant installation will be aborted.
2020-09-05 14:38:38.352 User chose OK.
2020-09-05 14:38:38.352 CurStepChanged raised an exception.
2020-09-05 14:38:38.353 Need to restart Windows? No
2020-09-05 14:38:38.373 Exception message:
2020-09-05 14:38:38.374 Message box (OK):
Internal error: Expression error 'Runtime error (at 191:1960):
Exception: Operation aborted.'
2020-09-05 14:38:40.747 User chose OK.
2020-09-05 14:38:40.747 Exception message:
2020-09-05 14:38:40.747 Message box (OK):
Internal error: Expression error 'Runtime error (at 191:1960):
Exception: Operation aborted.'
2020-09-05 14:38:42.082 User chose OK.
2020-09-05 14:38:42.103 Exception message:
2020-09-05 14:38:42.104 Message box (OK):
Out Of Range.
2020-09-05 14:38:44.052 User chose OK.
2020-09-05 14:38:51.259 -- Run entry --
2020-09-05 14:38:51.259 Run as: Original user
2020-09-05 14:38:51.259 Type: Exec
2020-09-05 14:38:51.260 Filename: C:\Program Files (x86)\Meeting Schedule Assistant\MeetSchedAssist.exe
I noticed that the redist setup was exiting with a result of 3010. I can't find any official documentation about the redist exit codes but it seems to be a soft reboot. Anyway, today they then tried my installer and it worked (since they had switched their PC of last night):
2020-09-06 13:08:38.707 VS Redist (64 bit) installer exit code = 0
2020-09-06 13:09:33.070 VS Redist (32 bit) installer exit code = 0
2020-09-06 13:09:33.071 Need to restart Windows? No
2020-09-06 13:10:07.741 -- Run entry --
2020-09-06 13:10:07.741 Run as: Original user
2020-09-06 13:10:07.741 Type: Exec
2020-09-06 13:10:07.741 Filename: C:\Program Files (x86)\Meeting Schedule Assistant\MeetSchedAssist.exe
So I am assuming that 3010 does mean soft reboot? And if so, is there a better way we can handle this situation in our Inno Setup installation?

If I understand correctly, the exit code means that the installer needs to restart the machine.
In that case, you can implement NeedRestart event function to request restart, when the exit code was 3010.
Add NeedRestart event function and NeedsRestart global variable:
var
NeedsRestart: Boolean;
function NeedRestart(): Boolean;
begin
Result := NeedsRestart;
end;
And modify your exit code testing logic to:
if ResultCode = 3010 then
begin
Log('Need restart');
NeedsRestart := True;
end
else
if ResultCode <> 0 then
begin
MsgBox(
ExpandConstant('{cm:InstallFailed,Visual Studio x64 Redistributable}'),
mbInformation, MB_OK);
Abort();
end;
Similar question: How to restart Inno Setup installer based on result of procedure that executes a program/subinstaller

Related

Azure Cosmos Db Emulator starting but never start

I use Azure Cosmos Db Emulator for about 1 year now and it’s the 3de time it sudently stop working.
The only way i found for resolve the problem was to do a complete re-install of windows 10 …
My configuration :
Windows 10 Pro
Administrator privilege
Domain link to AAD
Antivirus software : ESET Endpoint antivirus 9.1.2051.0
Intel(R) Core(TM) i5-4670 CPU # 3.40GHz 3.40 GHz
32 Go of RAM
All my software installed on C :
I try this in command prompt (as Administrator) :
Clear performance counter before start
Microsoft.Azure.Cosmos.Emulator.exe /shutdown
lodctr /R (2 time to be sure)
Microsoft.Azure.Cosmos.Emulator.exe
Result :
The notification for « Starting » show up
A dump file is create in AppData/Local/CrashDumps
The notification that the emulator is « start » never come
The web page never open
Uninstall – re-install
Microsoft.Azure.Cosmos.Emulator.exe /shutdown
Delete folder AppData\Local\CosmosDBEmulator
Uninstall Cosmos Db Emulator
Delete folder C:\Program Files\Azure Cosmos DB Emulator
Restart the computer
Install last app version : azure-cosmosdb-emulator-2.14.9-3c8bff92.msi
Check for start the emulator after install end
Result :
Same result than 1)
Start trace
- Microsoft.Azure.Cosmos.Emulator.exe /shutdown
- Microsoft.Azure.Cosmos.Emulator.exe /startwprtraces
- Microsoft.Azure.Cosmos.Emulator.exe
- [wait for 1 minute]
- Microsoft.Azure.Cosmos.Emulator.exe /stopwprtraces
- Microsoft.Azure.Cosmos.Emulator.exe /shutdown
Result :
The notification for « Starting » show up
A dump file is create in AppData/Local/CrashDumps
Until the 1 minute of waiting , a dump file was created for about every 20/30s
When i execute Microsoft.Azure.Cosmos.Emulator.exe /stopwprtraces, a docdbemulator_001.etl was created in C:\Program Files\Azure Cosmos DB Emulator
The notification that the emulator is « start » never come
The web page never open
I try to read the dump file with WinDbg.exe and i found this error message :
CLR_EXCEPTION_System.Collections.Generic.KeyNotFoundException_80131577_Microsoft.Azure.Documents.Common.dll!Microsoft.Azure.Documents.Common.Service.WindowsFabricConfigurationProvider.GetValue
And the stack trace was :
00000085`583feb40 00007ffe`49323302 Microsoft_Azure_Documents_Common!Microsoft.Azure.Documents.Common.Service.WindowsFabricConfigurationProvider.GetValue+0x52
00000085`583feb80 00007ffe`493230cb Microsoft_Azure_Documents_Common!Microsoft.Azure.Documents.Common.CrashDump.Register+0xdb
00000085`583febf0 00007ffe`48f673ee Microsoft_Azure_Cosmos_Compute_Host_ServiceFabric_EntryPoint!Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.CosmosDBGatewayInit+0x56e
00000085`583fecf0 00007ffe`48f51465 Microsoft_Azure_Cosmos_Compute_Host_ServiceFabric_EntryPoint!Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.Main+0x295
In windows logs I found the same error description (in french):
Application : Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.exe Version du Framework : v4.0.30319 Description : le processus a été arrêté en raison d'une exception non gérée. Informations sur l'exception : System.Collections.Generic.KeyNotFoundException à Microsoft.Azure.Documents.Common.Service.WindowsFabricConfigurationProvider.GetValue(System.String) à Microsoft.Azure.Documents.Common.CrashDump.Register(System.Collections.Generic.IEnumerable`1<System.String>, Microsoft.Azure.Cosmos.Core.IConfigurationProvider) à Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.CosmosDBGatewayInit(System.Fabric.CodePackageActivationContext, System.String) à Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.Main(System.String[])
And
Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.exe
2.14.0.0
bc4d0da5
KERNELBASE.dll
10.0.19041.1889
e9ede6d6
e0434352
0000000000034fd9
4360
01d8b7ac99b3d711
C:\Program Files\Azure Cosmos DB Emulator\Packages\CosmosGatewayService\CosmosGatewayService.Code\EP\Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.exe
C:\WINDOWS\System32\KERNELBASE.dll
01134c47-5efa-4d7a-a243-15af35536df0
Finaly I found that Cosmos Db create 3 Security Groups that are not delete on uninstall.
I delete all 3 and remove all registry reference on each. (searching for Cosmos Db and DocDb)
Now when i reinstall all work properly !
Thanks you David for your help.
I tried all of the above, the security groups are under Computer management
DocDbGatewayService
DocDBMasterService
DocDbServerService
This still didn't clear it for me, I did find the following in the Event Log
Application:
Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.exe
Framework Version: v4.0.30319 Description: The process was terminated
due to an unhandled exception. Exception Info:
System.Collections.Generic.KeyNotFoundException at
Microsoft.Azure.Documents.Common.Service.WindowsFabricConfigurationProvider.GetValue(System.String)
at
Microsoft.Azure.Documents.Common.CrashDump.Register(System.Collections.Generic.IEnumerable`1<System.String>,
Microsoft.Azure.Cosmos.Core.IConfigurationProvider) at
Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.CosmosDBGatewayInit(System.Fabric.CodePackageActivationContext,
System.String) at
Microsoft.Azure.Cosmos.Compute.Host.ServiceFabric.EntryPoint.EntryPoint.Main(System.String[])
And I managed to clear the issue with the following command
netsh http add iplisten ipaddress:0.0.0.0
This was taken from this thread - https://github.com/MicrosoftDocs/azure-docs/issues/6788

Dot Net Core application, hosted on IIS, crashes when the system restart

I have created a .NET core 5.0 project and published it. Then I hosted it on IIS. Whenever the system restarts, my application crashes. Logs after crashing are as follows:
[aspnetcorev2_inprocess.dll] Initializing logs for 'C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App\5.0.6\aspnetcorev2_inprocess.dll'. Process Id: 3364.. File Version: 15.0.21113.6. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: dc5e11abdb05b322f4b74b3afbcfb352fe984b2e.
[aspnetcorev2_inprocess.dll] Waiting for initialization
[aspnetcorev2_inprocess.dll] Starting in-process worker thread
[aspnetcorev2_inprocess.dll] Resolving hostfxr parameters for application: '.\FaxApi.exe' arguments: '' path: 'C:\inetpub\wwwroot\FaxApi\'
[aspnetcorev2_inprocess.dll] Known dotnet.exe location: 'C:\Program Files (x86)\dotnet\dotnet.exe'
[aspnetcorev2_inprocess.dll] Process path '.\FaxApi.exe' is not dotnet, treating application as standalone or portable with bootstrapper
[aspnetcorev2_inprocess.dll] Checking application.dll at 'C:\inetpub\wwwroot\FaxApi\.\FaxApi.dll'
[aspnetcorev2_inprocess.dll] Checking hostfxr.dll at 'C:\inetpub\wwwroot\FaxApi\.\hostfxr.dll'
[aspnetcorev2_inprocess.dll] hostfxr.dll found app local at 'C:\inetpub\wwwroot\FaxApi\.\hostfxr.dll', treating application as portable with launcher
[aspnetcorev2_inprocess.dll] Resolving absolute path to hostfxr.dll from 'C:\Program Files (x86)\dotnet\dotnet.exe'
[aspnetcorev2_inprocess.dll] hostfxr.dll located at 'C:\Program Files (x86)\dotnet\host\fxr\5.0.6\hostfxr.dll'
[aspnetcorev2_inprocess.dll] Parsed hostfxr options: dotnet location: 'C:\Program Files (x86)\dotnet\dotnet.exe' hostfxr path: 'C:\Program Files (x86)\dotnet\host\fxr\5.0.6\hostfxr.dll' arguments:
[aspnetcorev2_inprocess.dll] Argument[0] = 'C:\Program Files (x86)\dotnet\dotnet.exe'
[aspnetcorev2_inprocess.dll] Argument[1] = 'C:\inetpub\wwwroot\FaxApi\.\FaxApi.dll'
[aspnetcorev2_inprocess.dll] Setting environment variable ASPNETCORE_ENVIRONMENT=Production
[aspnetcorev2_inprocess.dll] Setting environment variable ASPNETCORE_IIS_HTTPAUTH=windows;anonymous;
[aspnetcorev2_inprocess.dll] Setting environment variable ASPNETCORE_IIS_PHYSICAL_PATH=C:\inetpub\wwwroot\FaxApi\
[aspnetcorev2_inprocess.dll] Loading hostfxr from location C:\Program Files (x86)\dotnet\host\fxr\5.0.6\hostfxr.dll
[aspnetcorev2_inprocess.dll] Initial Dll directory: '', current directory: 'C:\Windows\SysWOW64\inetsrv'
[aspnetcorev2_inprocess.dll] Setting dll directory to C:\Windows\SysWOW64\inetsrv
[aspnetcorev2_inprocess.dll] Setting current directory to C:\inetpub\wwwroot\FaxApi\
[aspnetcorev2_inprocess.dll] Managed application exited with code 0
[aspnetcorev2_inprocess.dll] Starting shutdown sequence 1
[aspnetcorev2_inprocess.dll] Clr thread wait ended: clrThreadExited: 1
[aspnetcorev2_inprocess.dll] Event Log: 'Application '/LM/W3SVC/1/ROOT/FaxApi' with physical root 'C:\inetpub\wwwroot\FaxApi\' has exited from Program.Main with exit code = '0'. Please check the stderr logs for more information.'
End Event Log Message.
[aspnetcorev2_inprocess.dll] Canceling standard stream pipe reader
[aspnetcorev2_inprocess.dll] Stopping in-process worker thread
[aspnetcorev2_inprocess.dll] Stopping CLR
[aspnetcorev2_inprocess.dll] Event Log: 'Application '/LM/W3SVC/1/ROOT/FaxApi' with physical root 'C:\inetpub\wwwroot\FaxApi\' failed to load coreclr. Exception message:
CLR worker thread exited prematurely'
End Event Log Message.
[aspnetcorev2_inprocess.dll] InvalidOperationException 'CLR worker thread exited prematurely' caught at D:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\inprocessapplication.cpp:432
[aspnetcorev2_inprocess.dll] Failed HRESULT returned: 0x8007023e at D:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\dllmain.cpp:131
[aspnetcorev2_inprocess.dll] Starting app_offline monitoring in application 'C:\inetpub\wwwroot\FaxApi\'
[aspnetcorev2_inprocess.dll] Starting file watcher thread
Application is able to start if I recycle the pool or if I restart IIS. Crashing occurs only if the system restarts.
I am using hosting bundle 5.0.6.
OS Name: Microsoft Windows Server 2012 R2 Standard
Version: 6.3.9600 Build 9600
IIS pool configurations are in the following link:
IIS pool configuration

The "InvokePowerShell" task failed unexpectedly when publishing from Visual Studio to Azure

Recently I copied my project (ASP.NET Core on Visual Studio 2015) to a new computer. Everything is set up except that I can't seem to publish to the existing App Service without getting an "InvokePowerShell" error.
I have tried creating a new publish profile, resetting the publish profile for the App Service on Azure, running Visual Studio as administrator but no good. Anyone kindly have an idea how to solve this?
Published 1/1 projects successfully
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Error MSB4018: The "InvokePowerShell" task failed unexpectedly.
System.Management.Automation.PSSecurityException: AuthorizationManager check failed. ---> System.Management.Automation.Host.HostException: A command that prompts the user failed because the host program or the command type does not support user interaction. The host was attempting to request confirmation with the following message: Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run C:\Users\rober\OneDrive\Documents\Visual Studio 2015\Projects\willfon\src\willfon\Properties\PublishProfiles\willfon20180423121452 - Web Deploy-publish.ps1?
at System.Management.Automation.Internal.Host.InternalHostUserInterface.ThrowPromptNotInteractive(String promptMessage)
at System.Management.Automation.Internal.Host.InternalHostUserInterface.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
at Microsoft.PowerShell.PSAuthorizationManager.RemoteFilePrompt(String path, PSHost host)
at Microsoft.PowerShell.PSAuthorizationManager.CheckPolicy(ExternalScriptInfo script, PSHost host, Exception& reason)
at Microsoft.PowerShell.PSAuthorizationManager.ShouldRun(CommandInfo commandInfo, CommandOrigin origin, PSHost host, Exception& reason)
at System.Management.Automation.AuthorizationManager.ShouldRunInternal(CommandInfo commandInfo, CommandOrigin origin, PSHost host)
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
at Microsoft.Web.Publishing.Tasks.InvokePowerShell.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>Publish failed due to build errors. Check the error list for more details.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
2-27-2020 And now today it's working. Who knows why.

Python3 installation failed, Error code 0x80070003

Python3 installation failed, error code 0x80070003.
My system is windows 10 64 bit, The installed version is 3.6.2
Installation error screenshot
The error log:
[2C1C:40E8][2018-01-15T12:32:04]e314: Failed to cache payload: core_AllUsers from working path: C:\Users\WESTIN~1\AppData\Local\Temp\{E8A75A81-A084-498C-865F-D7D322105665}\core_AllUsers, error: 0x80070003.
[2C1C:3D2C][2018-01-15T12:32:04]e000: Error 0x80070003: Cache thread exited unexpectedly.
[2C1C:3D2C][2018-01-15T12:32:04]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f71cfe9a-4a67-48a6-844b-571a76b33d33}, resume: ARP, restart: None, disable resume: No
[2C1C:3D2C][2018-01-15T12:32:04]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f71cfe9a-4a67-48a6-844b-571a76b33d33}, resume: ARP, restart initiated: No, disable resume: No
[2C1C:3D2C][2018-01-15T12:32:04]i399: Apply complete, result: 0x80070003, restart: None, ba requested restart: No*
when you perform the installation and choose the "Download debugging symbols" or "Download debug binaries", make sure your internet connection is up and available otherwise un-check those.

SSIS deployment issue [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Running an SSIS Package using dtexec
My SSIS package is working fine when I'm running it on my local system. My Package copies a blank template excel file which has only headers, to another place, and then populates this copy with data from the DB. However, when i place the package and config on the server, and schedule an SQL server job on it, it's throwing errors as follows :
Executed as user: CIQHYD\sqladmindev.
Microsoft (R) SQL Server Execute Package UtilityVersion 10.0.4000.0 for 64-bitCopyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 3:24:28 PM
Error: 2012-10-29 15:24:28.34
Code: 0xC001401E
Source: GICSReport Connection manager "GICSReport.xls"
Description: The file name "\\HYD-FILESVR\Departments\Technology\GICSReports\Dev\GICSReport.xls" specified in the connection was not valid.
End Error
Error: 2012-10-29 15:24:28.34
Code: 0xC001401D
Source: GICSReport
Description: Connection "GICSReport.xls" failed validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 3:24:28 PM
Finished: 3:24:28 PM
lapsed: 0.234 seconds
[SQLSTATE 42000] (Error 50000). The step failed.
When I delete the file at the Destination folder, i get this error :
Executed as user: CIQHYD\sqladmindev.
Microsoft (R) SQL Server Execute Package Utility
Version 10.0.4000.0 for 64-bitCopyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 3:15:38 PM
Error: 2012-10-29 15:15:38.57
Code: 0xC001401E
Source: GICSReport Connection manager "GICStemplate.xls"
Description: The file name "\\HYD-FILESVR\Departments\Technology\GICSAutomationTemplate\GICStemplate.xls" specified in the connection was not valid.
End Error
Error: 2012-10-29 15:15:38.57
Code: 0xC0202070
Source: GICSReport Connection manager "GICStemplate.xls" Description: The file name property is not valid. The file name is a device or contains invalid characters.
End Error
Error: 2012-10-29 15:15:38.57
Code: 0xC0029163
Source: Copy Template To Destination File System Task
Description: File or directory "\\HYD-FILESVR\Departments\Technology\GICSAutomationTemplate\GICStemplate.xls" represented by connection "GICStemplate.xls" does not exist.
End Error
Error: 2012-10-29 15:15:38.57
Code: 0xC002F30A
Source: Copy Template To Destination File System Task
Description: The source is empty.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 3:15:38 PM
Finished: 3:15:38 PM
Elapsed: 0.344 seconds [SQLSTATE 42000] (Error 50000). The step failed.
Version 10.0.4000.0 for 64-bitCopyright (C) Microsoft Corp 1984-2005.
Did you try to run it in 32-bit mode?
http://microsoft-ssis.blogspot.nl/2012/09/swtich-package-from-64bit-to-32bit.html

Resources