Inf2Cat Error 22.9.12 - INF cannot be copied to %Windir% - windows

I am making a driver official for Windows 7 as it it unsigned and the process to disable things to make the unsigned driver work is much more hassle then to actually sign the driver.
Well, in order to sign the driver, first I need to make the catalog file for the driver using the latest Inf2Cat from the Windows Driver Development Kit, all is going really well and there are no warnings but there is one error -
C:\Users\User\Downloads\dsdriv\dsdriv>"C:\Program Files (x86)\Windows Kits\8.1\bin\x86\Inf2Cat.exe" /driver:C:\Users\Support\Downloads\dsdriv\dsdriv /os:XP_X64,Server2003_X64,Vista_X64,
7_X64
................................
Signability test failed.
Errors:
22.9.12: INF file (\driver.inf) cannot be copied to %windir%\inf.
Warnings:
None
I've look around Google and I found results of where people have has similar errors but the solution was not explained, then I tried to use the Chkinf.bat utility that comes with the kit to help me find the error with the INF file but I came across a very strange error that the syntax of the command was incorrect, however I wrote the batch to check the INF file exactly to the Chkinf Documentation and yet it was still coming up with the syntax error, here is the bat that I compiled to check the driver.inf file -
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x86\ChkInf\chkinf" "C:\Users\User\Downloads\dsdriv\dsdriv\driver.inf"
I also tried -
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x86\ChkInf\chkinf.bat" "C:\Users\User\Downloads\dsdriv\dsdriv\driver.inf"
and -
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x86\ChkInf\chkinf" C:\Users\User\Downloads\dsdriv\dsdriv\driver.inf /L results.txt /B /LO
but no use.

The ChkInf may not be present in any of the above directories. It is shipped along the WinDDK.
You can find it exactly at
WinDDK_InstalledPath\Version_of_WinDDK\tools\Chkinf\chkinf.bat
The issue could be due to the [SourceDisksFiles] containing INF copy directives

Related

Error Strongly Naming DLL Without Source Code

I'm attempting to take a DLL that is not strongly named and then strongly name it without needing to have the source code, since I will not always have the source code, only the DLL. When I try and run the batch file with the below code to accomplish this I get an error. Here is the code:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\ildasm.exe" .\targetFile.dll /out:.\Signed\targetFile.il
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe" .\Signed\targetFile.il /dll /key=.\targetFile.snk /output=.\Signed\targetFile.dll
The error I get is the following:
.\Signed\targetFile.il(43) : error -- Failed to extract public key: 0x80070005
I'm not sure what I'm missing, I have permissions to all involved folders including the MacnineKeys folder in ProgramData.

Windows Driver build - incorrect path passed to Inf2Cat.exe

I'm new to the subject of windows drivers. I'm trying to build one of the Windows-driver-samples in Visual Studio 2015. The compilation and linking steps pass without errors and then I get the following error:
TRACKER : error TRK0002: Failed to execute command:
""C:\Program Files (x86)\Windows Kits\10\bin\x86\inf2cat.exe"
/os:10_x64 /driver:x64\Debug\WFPSamplerCalloutDriver\".
The operation identifier is not valid.
(Note the relative path in /driver argument). If I call Inf2Cat manually from command prompt with full path to the driver, it passes without a hitch:
C:\Program Files (x86)\Windows Kits\10\bin\x86>Inf2Cat.exe /os:10_x64
/driver:C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug\W
FPSamplerCalloutDriver
...........................
Signability test complete.
Errors:
None
Warnings:
None
Catalog generation complete.
C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug
\WFPSamplerCalloutDriver\wfpsamplercalloutdriver.cat
So, it seems to me that VS somehow failed to provide the full path to the driver in the argument to Inf2Cat.
How can I fix this? Which configuration property of my project is incorrect?
Description
Seems Inf2Cat from SDK10 does not accept directory path format provided by VS Project Configurator. Works when: either output folder name has with no trailing "\" or folder name ends up with "\.".
Workaroud
Disable Inf2Cat under Project Preferences: Run Inf2Cat -> No
Configure build events under Build-Events->Post Build-Event: Command Line -> "$(WindowsSdkDir)bin\$(DDKPlatform)\inf2cat.exe" /os:10_$(DDKPlatform) /driver:"$(ProjectDir)$(IntDir)$(MSBuildProjectName)"

VS2015 compile errors with Win API GetIscsiSessionList of Iscsidsc.h

I want to user a Windows API called GetIscsiSessionList to get the information of session list.
I came across with a compile problem, VS2015 complains as follows:
VS complians of GetIscsiSessionList:
VS complians in header file Iscsidsc.h:
Iscsidsc.h is in C:\Program Files (x86)\Windows Kits\8.1\Include\um
. Since Iscsidsc.h is a Windows provided file, I don't understand why VS compiler will complain.
The order of include header files should be as follows:
iscsierr.h should be in front of iscsidsc.h

Teamcity as Symbol Server no pdbs found

I am trying to use Teamcity as Symbol Server. I set Up TC like I should and TC is indexing my files.
I found THIS question so I tried it to find the symbols on the server. I get some .dll listed with the command symchk /r * /s SRV*http://outserver.acp.net/app/symbols. I Only see other dlls but not my libraries or pdbs.
What did i miss?
A short Log:
[14:45:48]Indexing sources appeared in file C:\BuildAgent\work\8652c4bdd8dd2154\***\File.pdb
[14:45:48]Information about 7 source files was updated
[14:45:53]Collecting symbol files signatures.
[14:45:53]Running command C:\BuildAgent\plugins\symbol-server\bin\JetBrains.CommandLine.Symbols.exe dumpSymbolSign /o="C:\BuildAgent\temp\buildTmp\symbol-signatures-8701232224987713334.xml" /i="C:\BuildAgent\temp\globalTmp\dumpSymbolSign5535309674029756055.input"

Creating Setup of large data with NSIS Script

I am creating setup of large data approximetly 10 GB with NSIS Script and trying to create a single setup (exe). Its giving an Error -
Internal compiler error #12345: error mmapping file (xxxxxxxxxx, xxxxxxxx) is out of range.
Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x).
Please tell me how to solve this issue ?
Is there any other way to create a setup for this kinda situation ?
NSIS installers are limited to 2Gb.
If you absolutely need it to be one file and you want to continue to use NSIS you have to append the data to the end of the generated setup. I'm not sure I would recommend that approach but it could work if the appended data is a zip file (or some other format with the header at the end) and you use one of the NSIS zip plugins to extract at run-time...
I have used https://sourceforge.net/projects/nsisbi/ instead of normal NSIS. It solved the problem.
I was using Silent Install Builder 5 and received this same error with a package installer that had LESS that 2 GB total. Once I determined that the NSIS compiler was to blame, I began experimenting with several possible solutions and here's what worked: I downloaded the newer NSISBI compiler from here https://sourceforge.net/projects/nsisbi/ and then did these 3 steps:
Go to C:\Program Files (x86)\Silent Install Builder 5 and renamed the default NSIS folder to a new name.
Copied the NSISBI folder into the C:\Program Files (x86)\Silent Install Builder 5 directory and renamed IT to NSIS.
Tries to compile some large packages above and just below 2GB and the first few tries I would get missing file errors in the Silent Install Builder 5 compiling box. No worries because the missing files are in the old NSIS folder, that's why y9u don't delete it.
Each time find the missing file error displays, find the missing files and copy them into the same folder location in the new NSIS folder. About 3 times you will do this until there are no more errors at all and you can then include the large files without generating the "internal compiler error #12345: error mmapping file xxxx is out of range." error message. NSISBI works!

Resources