signtool fail with inno setup : 0x80070003 - "Store IsDiskFile() failed" - inno-setup

I'm getting a weird error whiles signing my software. I'm using inno setup 4.5.2.
Running Sign Tool command: signtool.exe sign /a /f cert.pfx /v /t "http://timestamp.verisign.com/scripts/timstamp.dll" /p pwd /d "Setup Label" "out\uninst.e32.tmp"
SignTool Error: An unexpected internal error has occurred.
Error information: "Error: Store IsDiskFile() failed." (-2147024893/0x80070003)
Error in W:\path\installer.iss: Sign Tool failed with exit code 0x1.
Compile aborted.
Command line seems pretty ok, it even work outside the inno setup compile. While setting the SignedUninstaller=no get me farther, it still make this error while trying to sign the output setup file.
Now i've looked pretty much everywhere for that error code (0x80070003) and/or the message "Store IsDiskFile() failed". I have also tried with multiple version of signtool.

I figured out the problem, the path to the certificate must be relative to the installer output path, not the current working folder. In this case, it would be "..\cert.pfx".

I had the same problem. My problem was I have used " in the signTool command, while I needed to use $q instead. Surprisingly it was successfully signed the executable but it failed to sign the result setup.exe file.

In my case I had the wrong Path for the certificate file. A message like "pfx not found" would much be better than just "IsDiskFile() failed."....

My problem was having the .pfx file on a network drive (G:). Moving it to a lokal drive (C:) solved the problem.

Related

npm.cmd opens in notepad instead of being executed (ASP.NET Web API + Angular)

I have a problem very similar to this one, but instead of a command line application, I have a ASP.NET Web API project with an Angular project inside of it, created using a dotnet template 'angular' (dotnet new angular --name something. .NET 6.0.401).
When I run the application with dotnet run and open localhost:5097 I get a blank page with a message "Launching the SPA proxy...
This page will automatically redirect to https://localhost:44415 when the SPA proxy is ready." The console constantly prints info: Microsoft.AspNetCore.SpaProxy.SpaProxyMiddleware[0]
SPA proxy is not ready. Returning temporary landing page.
over and over again.
When I enter localhost:44415 I get an error in the console that says
fail: Microsoft.AspNetCore.SpaProxy.SpaProxyLaunchManager[0]
Couldn't start the SPA development server with command 'npm start'.
and a notepad window is opened with content
:: Created by npm, please don't edit manually.
#ECHO OFF
SETLOCAL
SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
)
IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (
SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
)
"%NODE_EXE%" "%NPM_CLI_JS%" %*
which is understandably the same as the npm.cmd's content in my node.js directory. The window name is also "npm.cmd".
As mentioned in the thread I attached previously, I removed a file association for .js in windows settings, but it hasn't changed anything. The last comment there says something about changing the contents of "lb-discover.cmd" file. I don't think an ASP.NET + Angular project has an analogical file to it.
I suspect it might have something to do with file association in windows, but I can't change it for .cmd files.
Thanks in advance.
As suggested by #Yitz - this thing worked
Open your .csproj file for editing, find the following property:
<SpaProxyLaunchCommand>npm start</SpaProxyLaunchCommand>
and change it as follows:
<SpaProxyLaunchCommand>cmd.exe /c npm start</SpaProxyLaunchCommand>
This should work around possible issues with file association for .cmd

Linux:load error:No such file or directory

I am deploying a web server, and after I finish compiling.There are the executing documents;
01client.c client epoll_server.c server
Then I try to run server
./server
There is an error which I cant fix it. I have search ways for solving but still can't fix it.
load error: No such file or directory
Maybe some one can help me,please!
Thanks a lot!!!!
System utilities print the program generating the error at the beginning of the line followed by other useful information such as the name of the missing file, so this is probably an error from a user program. I can duplicate the error as follows:
errno = 2;
perror("load error");
which prints:
load error: No such file or directory
Look for the perror line in the server code. If it isn't clear what file it can't find, print the string from the failed command it is reporting.

How to sign in windows installer using electron builder

I am configuring package.json for windows. The packager is working fine. But, I also want to sign my windows installer file and unable to do.
I have gone through this tutorial WindowsConfiguration and got this line:
sign String | (configuration: CustomWindowsSignTaskConfiguration) =>
Promise - The custom function (or path to file or module id) to sign
Windows executable.
The problem is, I am not getting how to create JS file for windows installer signing and what parameters I have to use for its configurations. Thanks for your time.
With electron-builder, the only thing you need to sign your Windows application is to set this two Environment Variables CSC_LINK and CSC_KEY_PASSWORD as explained here : https://www.electron.build/code-signing.
-- alternative --
You can do the same by setting this in your package.json like this (but not recommended):
"build": {
...
"win": {
...
"certificateFile": "path to your cert",
"certificatePassword": "the password of your cert"
}
}
Hope this helps.
You can create your own signtool to sign what you need.
Firstly, you need signtool.exe from Microsoft: https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe
Then call child_process.exec to sign your file, for example:
exec(`call "${PATH_TO_SIGNTOOL_EXE}" sign /f "${KEY_SHA256}" /p ${PASS_KEY_SHA256} /fd sha256 /tr "http://sha256timestamp.ws.symantec.com/sha256/timestamp" /td sha256 /as /v "${FILE_TO_SIGN}"`)

build solution from command line

I'm trying to build a number of solutions from a cmd file using command lines to handle the whole build
this is the line that builds the solution:
for /f %%i in (%CFG%\bld.lst) do set OUT= %%i Release %REBUILD%& call :out & C:\"Program Files (x86)"\"Microsoft Visual Studio 12.0"\Common7\IDE\devenv.exe %%i %REBUILD% Release >>%LOG%
the solutions are in (%CFG%\bld.lst)
if I add error catching as in:
if errorlevel 1 set OUT= Failed to build %%i Release & goto :error_term at the end of the line the build crashes
if I don't then the eventviewer shows me this error:
The description for Event ID 0 from source VSTTExecution
cannot be found. Either the component that raises this event is not
installed on your local computer or the installation is corrupted. You
can install or repair the component on the local computer.
If the event originated on another computer, the display information
had to be saved with the event.
The following information was included with the event:
(devenv.exe, PID 2004, Thread 1) UIContextHelper.SetUIContext: The call to IVsAggregatableProject.GetCmdUIContextCookie failed. Error code: -2147467259
the message resource is present but the message is not found in the string/message table
if I build each of the solutions from VisualStudio the solution builds correctly
I should mention some of the projects where written in VS 2010 and some in VS 2013
it's turning my hair grey. HELP!
Danieli

erlang zip:unzip/1 {error, bad_central_directory} and {error, bad_eocd}

I have always used erlang stdlib library zip:unzip/1 successfully. Last night i hit a bar with this error:
E:\WimaxStatsParser-1.1>erl
Eshell V5.9.2 (abort with ^G)
1> zip:unzip("e:/WimaxStatsParser-1.1/in/SomeZipFile.zip").
{error,bad_central_directory}
2>
Some one help explain the cause for this ? and how i get around it ?
ADDITIONS
I got some other error on another file: {error,bad_eocd}. Please explain this as well.
I am not able to reproduce your problem with the information you give. There are 2 functions that may send this error:
get_cd_loop/5 and get_name_extra_comment/4 in stdlib-1.18.2/src/zip.erl .
it should be easy to debug
copy the file zip.erl, zip.hrl, file.hrl in a working directory,
compile with debug_info option, you will get the error message "Can't load module that resides in sticky dir", leave the VM
copy zip.beam in the stdlib.../ebin
restart the VM in the working directory, you can now add breakpoint in the zip.erl source.
BR
Pascal.

Resources