MSFN Forum: How can I install a .inf file from the command line? - MSFN Forum

Jump to content


Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

How can I install a .inf file from the command line? Rate Topic: -----

#1 User is offline   lucky2007 

  • Group: Members
  • Posts: 3
  • Joined: 16-September 06

  Posted 21 September 2007 - 09:12 PM

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 :)


#2 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,230
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 21 September 2007 - 09:34 PM

Try Adanced INF way, it has more options

Quote

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

Quote

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

This post has been edited by ricktendo64: 21 September 2007 - 09:39 PM


#3 User is offline   lucky2007 

  • Group: Members
  • Posts: 3
  • Joined: 16-September 06

Posted 21 September 2007 - 10:17 PM

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:

#4 User is offline   Inferi0r 

  • Little dude
  • PipPip
  • Group: Members
  • Posts: 180
  • Joined: 28-July 06

Posted 22 September 2007 - 01:21 AM

Check Gosh' site.

#5 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,463
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 22 September 2007 - 09:08 AM

And the link here:
http://www.boot-land.net/forums/Useful-inf...-inf-t1966.html
http://www.boot-land...?showtopic=1966

jaclaz

This post has been edited by jaclaz: 21 May 2009 - 11:36 AM


#6 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,230
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 22 September 2007 - 07:42 PM

http://www.sokoolz.c...r64/INF_DOC.ZIP

#7 User is offline   wherzdaluv 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 06-February 05

Posted 23 September 2007 - 12:09 PM

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.

#8 User is offline   Arie 

  • One Man Army
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 27-August 07

Posted 25 September 2007 - 08:22 AM

View Postwherzdaluv, on Sep 23 2007, 08:09 PM, said:

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.

#9 User is offline   lucky2007 

  • Group: Members
  • Posts: 3
  • Joined: 16-September 06

Posted 26 September 2007 - 01:21 PM

Thx for the aswers :thumbup

and sorry for the late reply (internet problem) :angry:

#10 User is offline   seattleman1969 

  • Group: Members
  • Posts: 1
  • Joined: 21-May 09

Posted 21 May 2009 - 10:16 AM

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!

This post has been edited by seattleman1969: 21 May 2009 - 10:19 AM


#11 User is offline   Martin H 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 802
  • Joined: 24-November 06
  • OS:none specified

Posted 21 May 2009 - 12:40 PM

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


#12 User is offline   Velund 

  • Group: Members
  • Posts: 3
  • Joined: 24-August 09

Posted 24 August 2009 - 09:29 AM

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.

This post has been edited by Velund: 24 August 2009 - 09:31 AM


#13 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 866
  • Joined: 11-November 08

Posted 24 August 2009 - 10:07 AM

http://social.msdn.microsoft.com/Forums/en...8c-f08ce75c7bf1

good thread for swapping/editing the wdma_usb.inf file

#14 User is offline   Velund 

  • Group: Members
  • Posts: 3
  • Joined: 24-August 09

Posted 25 August 2009 - 12:53 AM

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...

This post has been edited by Velund: 25 August 2009 - 12:55 AM


#15 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 866
  • Joined: 11-November 08

Posted 25 August 2009 - 05:41 AM

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).

#16 User is offline   Velund 

  • Group: Members
  • Posts: 3
  • Joined: 24-August 09

Posted 26 August 2009 - 02:37 AM

I actually need to change some registry values for my usb audio(USBAudio.AddReg section in wdma_usb.inf) and keep them for all the rest usb audio devices. It's can easly done manually when device is installed - i can reinstall my driver or go to the registry and change the keys. What i need is make windows install my driver by default... probably the only option to do this is to sign the .inf file.

iamtheky
Anyway, if you'll find something, please let me know.

This post has been edited by Velund: 26 August 2009 - 02:38 AM


#17 User is offline   click-click 

  • Junior
  • Pip
  • Group: Members
  • Posts: 71
  • Joined: 08-October 09

Posted 09 March 2013 - 05:20 AM

I'm trying to install a ThinkPad LCD Monitor inf file with advpack and it doesn't install. There are no error messages and nothing happens as far as I can tell. If I use explorer and right-click the .inf and select install, it works fine. I don't understand why the command line doesn't work. This is the cmd I'm using:
rundll32.exe advpack.dll,LaunchINFSectionEx D:\@Drivers\$T500\$Common\Video\LCDMon\geoi02w8\tplcd.inf
The inf file looks like this:
Spoiler
Anyone know why it doesn't install with the command line I used?

This post has been edited by click-click: 09 March 2013 - 05:29 AM


#18 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,463
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 09 March 2013 - 05:57 AM

View Postclick-click, on 09 March 2013 - 05:20 AM, said:

The inf file looks like this:
....
Anyone know why it doesn't install with the command line I used?

I cannot find a DefaultInstall section in that .inf file (re-read the thread).

http://www.msfn.org/...post__p__695273

Quote

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


http://www.msfn.org/...post__p__858362

jaclaz

#19 User is offline   click-click 

  • Junior
  • Pip
  • Group: Members
  • Posts: 71
  • Joined: 08-October 09

Posted 09 March 2013 - 06:20 AM

okay, understood, but how does the right-click on .inf -> install find the right install section?

I was thinking that method also used advpack under the covers.

I still can't get it to install by adding the inf section TPLCDWSXGAP.Install.NTx86

Now I get INF Install failure. Reason: The parameter is incorrect
rundll32.exe advpack.dll,LaunchINFSection D:\@Drivers\$T500\$Common\Video\LCDMon\geoi02w8\tplcd.inf,TPLCDWSXGAP.Install.NTx86


This post has been edited by click-click: 09 March 2013 - 08:28 AM


#20 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,463
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 09 March 2013 - 09:37 AM

I guess that if you provide a parameter, you ALSO need to provide the other parameters. :unsure:

Why don' t you simply do first thing EXACTLY what has been posted on this thread?

Quote

rundll32.exe advpack.dll,LaunchINFSectionEx D:\@Drivers\$T500\$Common\Video\LCDMon\geoi02w8\tplcd.inf,TPLCDWSXGAP.Install.NTx86,,4

or:

Quote

rundll32.exe advpack.dll,LaunchINFSection D:\@Drivers\$T500\$Common\Video\LCDMon\geoi02w8\tplcd.inf,TPLCDWSXGAP.Install.NTx86,1



jaclaz

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

4 User(s) are reading this topic
0 members, 4 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy