How to extract .inf/.sys install files? - windows

I have a .inf file that install a .sys file from the windows xp system folder when the user plugs an USB hardware. I would like to trace the files that the windows auto-install on the system, so I can develop an automated installer that doesnt bother the user. Any ideas?
Thanks

FileMon monitors and displays file system activity on a system in real-time. You could use it.
But Windows wouldn't allow to copy files in system32 or drivers directories. You should use Driver Install Frameworks API to install the driver.

Related

Wireless connection in WinPE 5.1

I need to deploy an image of Windows 8.1 on devices with only one USB port.
To facilitate the system, I try to connect WinPE by wi-fi, without success.
I get an error 0x000022f when I try to load the driver netvwifibus with drvload.
I have no found other solution; existing plugins for it
any ideas or instructions for this ?
regards,
which base WIM are you using?
The default from the ADK?
I never tried it with PE 5.1, but with PE 10 this is working if you use the WIM-File intended for Recovery.
I´m doing this this way:
Mount the Win8.1 ISO
Extract the Install.wim (located in \sources)
Mount the Install.wim via dism (or try to open it with 7-zip)
Extract the WinRE.Wim (located in \windows\system32\recovery), rename it to winpe.wim
Build your PE as usual.

Is there an alternative for Autorun.inf for Windows 7 / 8 / 8.1 / 10?

For a customer we created a software which will be installed at about 350 USB sticks. Now we want that this .exe is automatically executed when the stick is plugged into the PC.
A few years ago we used the simple autorun.inf method.
But for Windows 7 and later Windows versions this function is not longer working as I've seen. That makes me a little bit wondering because in my system control I can select how the drive will be opened. At "software and games" I selected "always ask", then I put this Autorun.inf on the stick:
[autorun]
open=Demo1.exe
But it's not working. The only thing that Windows makes when I plug the stick into, it asks whether I want to open the drive folder.
What I have to do that the software starts automatically OR a window opens in which the user can decide to run the executable or don't do that?
For Windows 7 and later only optical drives can specify auto run tasks. Indeed earlier versions of Windows can be patched to behave the same way. This change was made in response to the Conficker worm.
So your goal simply cannot be achieved. You will need to instruct users to explore the memory stick and run a specific program manually.
You cannot specify autorun.inf tasks for USB drives. Read here for futher Information: http://blogs.msdn.com/b/e7/archive/2009/04/27/improvements-to-autoplay.aspx
Previous answers from David Heffernan and Mofi are right. Only CD/DVD/Optical drives are allowed to specify auto run tasks.
BUT, if you identify the manufacturer of the USB chip and get the firmware management tool for this chip, you can reconfigure it and get the USB to appear as a CD drive to the OS.
If this seems an overhelming task, you can get your USB created by some companies dedicated to the distribution of multimedia content.
And Microsoft released for Windows XP, Windows Vista, Windows Server 2003 and Windows Server 2008 the security hotfix KB967940 explained at Microsoft Security Advisory (967940) which disables the autorun feature for all drives except CD and DVD drives. See also ZDNet article Microsoft disables AutoRun on Windows XP/Vista to prevent malware infections.
So it is not possible anymore that something is automatically started when a writable USB flash memory device is plugged in to prevent malware to run automatically.

File format for Windows Device Driver

What extensions could correspond to Windows Device Driver source files?
Is *.inf, *cat or *.sys it?
I am trying to search for the source code of a driver in a heap of legacy code, I see files with above mentioned extensions.
If it is legacy driver and built using command prompt (not newer visual studio), then you better of looking for file named SOURCES. It is similar to makefiles and will list driver file name (somedriver.sys) as well as list of source files -.c- for that driver.
*.sys is the actual driver. inf and cat are for installation parameters.
Your device driver source code files will most likely have .c and .h extensions, they will be written in the C programming language and when compiled will form the executable driver (with the .sys extension).
The .inf files are like a script used by Windows to install the device driver into the operating system, they identify the executable file name (your .sys files) and how the driver is installed etc.
The .cat files are used to store certificates and the driver signing signatures of the compiled driver, they are used by Windows during installation of the driver to make sure there's nothing malicious going on.
The .inf .cat and .sys files form the Windows driver package needed by the end user, they don't contain the actual source code of the executable driver.

Is it possible to install USB serial converter in Windows without administrator privileges?

I have got a piece of hardware which communicates with my program using an FT2232C USB serial converter. All works fine if the device has already been attached to a computer before and the drivers were installed using an administrator account. But that is not the usual case.
These devices will be attached and removed at will and it will also not always be the same device that will be attached to a particular computer. Also, most of the users will not have administrator privileges and the computers are not connected to a LAN.
It is possible to automatically push files to these computers and add registry entries.
Does anybody have got any pointers on how to make Windows believe the devices driver has already been installed? I am currently thinking along the lines of tracking all changes that the driver installer does to the Windows installation and making these changes without any user interaction. But maybe there is an easier way?
We are currently talking Windows XP but in the not so far future there will be more and more Windows 7 (64 bit) computers as well.
While you could "pre-install" the driver by doing all the changes to the registry yourself (under a SYSTEM account, not regular Administrator -- you can use SysInternals PsExec to do this), this wouldn't help you unless you'd preinstall it for all possible ports. (Only USB devices which have an embedded serial number can be installed just once. Others are installed per-port.)
Another option is to sign the driver. A signed driver installs silently without the need for administrative credentials.
Does the vendor driver come with a .cat file? (And is the .cat file WHQL-signed?) If yes, you don't have a problem. Just install the driver with the standard tools (e.g. DPInst).
If not, you can always generate your own WHQL certificate (you cannot BUY a WHQL certificate), push this to all computers (since you're an administrator, you can do this) and then use the regular Windows tools (e.g. DPInst) to place the driver in the machines' driver stores. To generate the certificate, use CertUtil.exe and make sure you specify the "Windows System Component Verification" EKU. To sign the driver, use MakeCat.exe and SignTool.exe.
The best method with XP for the timebeing is to get hold of the administrator password, I used the following method a few months back and it has been brilliant, there is free software and instructions available here:
http://www.loginrecovery.com/

Forcing Windows to re-scan for drivers

As part of our software's installation, we install drivers for a required 3rd party hardware component. Currently it's up to the user to manually scan for their hardware's drivers once our installation is completed.
Is there an easy way to get Windows to automatically look for the drivers we installed? If so, how does it work? Do we need to tell the OS for which hardware device we have drivers, or just that we have drivers in a certain location? Or can we just install the drivers to System32 folder and trigger a driver rescan?
So the hardware is already plugged in when you install the driver?
Download the Windows Driver Kit (WDK) and see the devcon sample (binary and source included). The "devcon update" command should do what you want (i.e. install the drivers and then load them over the specified device instance).
-scott

Resources