lucky2007

How can I install a .inf file from the command line?

26 posts in this topic

wel I know this one works:

rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 .\<file>.inf

but I can stil see files being copied, so I was wondering if anyone can tell me how to hide it, if it is posible.

thx in advance :)

0

Share this post


Link to post
Share on other sites

Try Adanced INF way, it has more options

rundll32.exe advpack.dll,LaunchINFSectionEx inf_filename,[section name],[cab name],<flags>[,smart reboot]
INF Filename

INF filename you want to launch. If the given name is not full pathname, advpack.dll will extract the INF from the given CAB file.

Section Name

INF install section name you want to launch. If it is empty string or NULL, DefaultInstall section name will be called.

Cab Name

Specify the fully qualified CAB file pathname which contains the files or INF you want to install to the user's system.

Flags

Flag Meaning

4 Quiet Mode, no UI

8 Don't Run GrpConv

16 Force Self-Updating on User's System

32 Backup Data Before Install

64 Rollback to Previous State

128 Validate the Backup Data

256 Complete Rollback to Previous State

512 Force Delay of OCX Registration

Smart Reboot

N No Reboot

A Always Reboot

I Reboot if Needed (default value)

Example:

rundll32.exe advpack.dll,LaunchINFSectionEx myinf.inf,,c:\temp\mydata.cab,36

This means to extract myinf.inf file from c:\temp\mydata.cab file and launch myinf.inf with DefaultInstall section in Quiet|Backup install mode, reboot if needed.

rundll32.exe advpack.dll,LaunchINFSectionEx c:\windows\inf\myinf.inf,,,256

This means to rollback to the state before installing myinf.inf DefaultInstall section.

So to make it silent it would be:

rundll32.exe advpack.dll,LaunchINFSectionEx .\<file>.inf,,,4

Edited by ricktendo64
0

Share this post


Link to post
Share on other sites

thx,

do you perhaps know where to find some more info about Adanced INF(want to learn a bit more about what it can do and how it works)?

if I google it it only shows up people with errors :rolleyes:

0

Share this post


Link to post
Share on other sites

not sure from command line, but in windows just right click on it and instal. only thing i could think of is figure out the hex for right click and then figure out instal code.

0

Share this post


Link to post
Share on other sites
not sure from command line, but in windows just right click on it and instal. only thing i could think of is figure out the hex for right click and then figure out instal code.

The answer is already given, read up.

0

Share this post


Link to post
Share on other sites

Good information but we are attempting to use this to install from command line a "special" INF for Internet Component Download Service. Does anyone have any information on how to execute one of THOSE INF files from command line successfully?

Our goal is to take the payload from a cab file downloaded from an internet site and execute the .INF located within to install the application since our user base doesn't have permissions to install any software, and we do not want to change that. This will be scripted through winbatch and executed with elevated permissions through LANDesk once we get the command line figured out.

Thanks!

Edited by seattleman1969
0

Share this post


Link to post
Share on other sites

If the INF to install has a DefaultInstall section, then it's silently installed with:

rundll32 advpack.dll,LaunchINFSection <PathTo>\name.inf,,1

(advpack runs the Advanced INF commands(if any), and calls setupapi for the standard INF commands)

However, with many 3'rd party INFs, then a DefaultInstall section is not always used, and then you need to investigate which install-section to call instead:

rundll32 advpack.dll,LaunchINFSection <PathTo>\name.inf,<InstallSection>,1

0

Share this post


Link to post
Share on other sites

Hi.

I hope there is somebody here on this forum and reading this topic. I trying to overread the default windows driver for usb audio device. I created the the .inf file and i trying to install it using rundll32 advpack.dll ... I do it successfully and i see that OEM inf file added to windows inf directory, but when i plug in the device it still uses default driver. If i manually install my .inf from the device manager it works fine. I know that this happend because my file is without certificate, but maybe there is still a way to make my driver to become default driver for my device? If not, how can i SIGN my inf file?

Thanks in advance.

Edited by Velund
0

Share this post


Link to post
Share on other sites

Yes i saw this thread before, it helped me to build my .inf file. My problem now is different. I want windows to use my .inf as default driver for my usb audio device instead of wdma_usb.inf. I can't change wdma_usb.inf it self because it's signed file and it won't work if changed...

Edited by Velund
0

Share this post


Link to post
Share on other sites

its been a while since i played with this, but I remember only changing the pointer in wdma_usb from usbaudio.inf to the new .inf

I'll continue looking for the directions I followed for that (but I keep coming back to that same article).

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.