Jump to content

Install video driver with Rundll32 from command line


coolman

Recommended Posts

I don't know if this is the correct forum or not.

Anyway, I am trying to install a video driver using Rundll32.exe in a command line, but every time I have executed my code and restarted and then went back into the Display Settings in Control Panel, I couldn't change any settings, so it looks like it didn't make a change even though it processed everything and copied its files. Is there something I'm missing? Here is my code:

start /wait C:\WINDOWS\RUNDLL32.EXE setupx.dll,InstallHinfSection Driver.Install 132 C:\WINDOWS\INF\VBEMP.INF

Here is the INF file:

; INF file for VBEMP display driver
; Copyright 1988-2008, Anapa Corp.

[version]
DriverVer = 10/21/2008, 8.10.0021
Class=DISPLAY
signature="$CHICAGO$"
Provider=%Mfg%

[DestinationDirs]
DefaultDestDir = 11 ; LDID_SYS
Driver.Copy = 11

[SourceDisksNames]
1="Windows 9x VBEMP Driver Disk",,0

[SourceDisksFiles]
vbemp.drv=1
vbe.vxd=1

[Manufacturer]
%Mfg%=Mfg

[Mfg]
%AnaPa.DeviceDesc% = Driver.Install, NOPNP
%AnaPa.DeviceDesc%%AnaPa.DeviceDesc1% = Driver.Install, PCI\CC_0300
%AnaPa.DeviceDesc%%AnaPa.DeviceDesc2% = Driver.Install, PCI\CC_0301
%AnaPa.DeviceDesc%%AnaPa.DeviceDesc3% = Driver.Install, PCI\CC_0380
%AnaPa.DeviceDesc%%AnaPa.DeviceDesc4% = Driver.Install, *PNP0900
%AnaPa.DeviceDesc%%AnaPa.DeviceDesc5% = Driver.Install, *PNP0917
%AnaPa.DeviceDesc%%AnaPa.DeviceDesc6% = Driver.Install, NOPNP

[Driver.Install]
CopyFiles=Driver.Copy
DelReg=Prev.DelReg
AddReg=Driver.AddReg
LogConfig=Driver.LogConfig

[Driver.LogConfig]
ConfigPriority=HARDWIRED
IOConfig=3B0-3BB
IOConfig=3C0-3DF
MemConfig=A0000-AFFFF
MemConfig=B8000-BFFFF
MemConfig=C0000-C7FFF,D0000-D7FFF,E0000-E5FFF,E0000-E7FFF

[Driver.Copy]
vbemp.drv
vbe.vxd

[Prev.DelReg]
HKR,,Ver
HKR,,DevLoader
HKR,DEFAULT
HKR,MODES
HKR,CURRENT

[Driver.AddReg]
HKR,,Ver,,4.0
HKR,,DevLoader,,*vdd
HKR,DEFAULT,Mode,,"8,640,480"
HKR,DEFAULT,drv,,vbemp.drv
HKR,DEFAULT,vdd,,"*vdd,*vflatd"
HKR,DEFAULT,minivdd,,vbe.vxd
HKR,DEFAULT,RefreshRate,,-1
HKR,DEFAULT,DDC,,1
HKR,DEFAULT,ExtModeSwitch,,0 ;disables full screen extended modes in a window?
HKR,"MODES\1\640,480",drv,,framebuf.drv
HKR,"MODES\1\640,480",vdd,,*vdd
HKR,"MODES\4\640,480",drv,,vga.drv
HKR,"MODES\4\640,480",vdd,,*vdd
HKR,"MODES\4\800,600",drv,,supervga.drv
HKR,"MODES\4\800,600",vdd,,*vdd
HKR,"MODES\8\320,200"
HKR,"MODES\8\320,240"
HKR,"MODES\8\400,300"
HKR,"MODES\8\512,384"
HKR,"MODES\8\640,400"
HKR,"MODES\8\640,480"
HKR,"MODES\8\800,480"
HKR,"MODES\8\800,600"
HKR,"MODES\8\1024,600"
HKR,"MODES\8\1024,768"
HKR,"MODES\8\1152,864"
HKR,"MODES\8\1280,800"
HKR,"MODES\8\1280,1024"
HKR,"MODES\8\1600,1200"
HKR,"MODES\8\1920,1440"
HKR,"MODES\15\320,200"
HKR,"MODES\15\320,240"
HKR,"MODES\15\400,300"
HKR,"MODES\15\512,384"
HKR,"MODES\15\640,400"
HKR,"MODES\15\640,480"
HKR,"MODES\15\800,480"
HKR,"MODES\15\800,600"
HKR,"MODES\15\1024,600"
HKR,"MODES\15\1024,768"
HKR,"MODES\15\1152,864"
HKR,"MODES\15\1280,800"
HKR,"MODES\15\1280,1024"
HKR,"MODES\15\1600,1200"
HKR,"MODES\15\1920,1440"
HKR,"MODES\16\320,200"
HKR,"MODES\16\320,240"
HKR,"MODES\16\400,300"
HKR,"MODES\16\512,384"
HKR,"MODES\16\640,400"
HKR,"MODES\16\640,480"
HKR,"MODES\16\800,480"
HKR,"MODES\16\800,600"
HKR,"MODES\16\1024,600"
HKR,"MODES\16\1024,768"
HKR,"MODES\16\1152,864"
HKR,"MODES\16\1280,800"
HKR,"MODES\16\1280,1024"
HKR,"MODES\16\1600,1200"
HKR,"MODES\16\1920,1440"
HKR,"MODES\24\320,200"
HKR,"MODES\24\320,240"
HKR,"MODES\24\400,300"
HKR,"MODES\24\512,384"
HKR,"MODES\24\640,400"
HKR,"MODES\24\640,480"
HKR,"MODES\24\800,480"
HKR,"MODES\24\800,600"
HKR,"MODES\24\1024,600"
HKR,"MODES\24\1024,768"
HKR,"MODES\24\1152,864"
HKR,"MODES\24\1280,800"
HKR,"MODES\24\1280,1024"
HKR,"MODES\24\1600,1200"
HKR,"MODES\24\1920,1440"
HKR,"MODES\32\320,200"
HKR,"MODES\32\320,240"
HKR,"MODES\32\400,300"
HKR,"MODES\32\512,384"
HKR,"MODES\32\640,400"
HKR,"MODES\32\640,480"
HKR,"MODES\32\800,480"
HKR,"MODES\32\800,600"
HKR,"MODES\32\1024,600"
HKR,"MODES\32\1024,768"
HKR,"MODES\32\1152,864"
HKR,"MODES\32\1280,800"
HKR,"MODES\32\1280,1024"
HKR,"MODES\32\1600,1200"
HKR,"MODES\32\1920,1440"

[Strings]
Mfg="Anapa Corp."
AnaPa.DeviceDesc = "VBE Miniport"
AnaPa.DeviceDesc1 = " - Standard PCI Graphics Adapter (VGA)"
AnaPa.DeviceDesc2 = " - Standard PCI Graphics Adapter (XGA)"
AnaPa.DeviceDesc3 = " - Standard PCI Graphics Adapter"
AnaPa.DeviceDesc4 = " - Standard Graphics Adapter (VGA)"
AnaPa.DeviceDesc5 = " - VGA"
AnaPa.DeviceDesc6 = " - SVGA"

I am using Windows 98 Second Edition. I am a newbie to this kind of stuff.

Edited by coolman
Link to comment
Share on other sites


Your question also here -

http://stackoverflow.com/questions/14452701/install-video-driver-with-rundll32-in-a-command-line

XP -

http://stackoverflow.com/questions/619604/installing-a-inf-file-using-a-windows-batch-file

More here (from #44) -

http://www.robvanderwoude.com/rundll.php

RUNDLL32 advpack.dll,LaunchINFSection inf_file.INF,DefaultInstall

An example I found (you can search for it and find the link) for MSBATCH.INF

"%25%\rundll32.exe advpack.dll,LaunchINFSection %10%\msbatch.inf,Installed.Components.Advanced"

In your case, it maybe should maybe look like this

RUNDLL32 advpack.dll,LaunchINFSection C:\WINDOWS\INF\VBEMP.INF,Driver.Install

I do NOT know if this will work but try it...

For the record -

http://www.navozhdeniye.narod.ru/vbe9x.htm

HTH

Edited by submix8c
Link to comment
Share on other sites

Your question also here -

http://stackoverflow.com/questions/14452701/install-video-driver-with-rundll32-in-a-command-line

XP -

http://stackoverflow.com/questions/619604/installing-a-inf-file-using-a-windows-batch-file

More here (from #44) -

http://www.robvanderwoude.com/rundll.php

RUNDLL32 advpack.dll,LaunchINFSection inf_file.INF,DefaultInstall

An example I found (you can search for it and find the link) for MSBATCH.INF

"%25%\rundll32.exe advpack.dll,LaunchINFSection %10%\msbatch.inf,Installed.Components.Advanced"

In your case, it maybe should maybe look like this

RUNDLL32 advpack.dll,LaunchINFSection C:\WINDOWS\INF\VBEMP.INF,Driver.Install

I do NOT know if this will work but try it...

For the record -

http://www.navozhdeniye.narod.ru/vbe9x.htm

HTH

Didn't work.

Link to comment
Share on other sites

Yes it did... just tested it. The two files "VBE.VXD" and "VBEMP.DRV" are now in "Windows\System" folder You already have a Video Driver installed, don't you? That can only be changed in Device Manager via "Properties-Driver->Update Driver->All Drivers"". Of course, after I selected it I had to point to the "SYSTEM" folder to find the two files. Mine now say "VBE Miniport - SVGA" and woks fine. ;) The only OTHER way is when you initially install via MSBATCH.INF. Installing a Driver doesn't mean it AUTOMAGICALLY gets used.

Inside the INF (this is what I selected)

[Strings]
Mfg="Anapa Corp."
AnaPa.DeviceDesc = "VBE Miniport"
<snip>
AnaPa.DeviceDesc6 = " - SVGA"

Let me guess - you don't have an Official Driver for your Video (you are Limited to 640x480/16-color) and you need the VBEMP Driver to "expand" it.

http://www.tomshardware.com/forum/7476-49-windows-colors-only

BTW, if this is in a VirtualBox VM, I found a notation here (September 2008) -

https://forums.virtualbox.org/viewtopic.php?t=9918

3. Video driver integration.

By default Windows 98 will run only in 640x480 resolution, 16-colors.

and mentions both VBEMP and SciTech drivers.

edit - Forgot to mention the INF and other two files are REQUIRED to be in the SAME FOLDER dung Install. ;)

HTH

Edited by submix8c
Link to comment
Share on other sites

Yes it did... just tested it. The two files "VBE.VXD" and "VBEMP.DRV" are now in "Windows\System" folder You already have a Video Driver installed, don't you? That can only be changed in Device Manager via "Properties-Driver->Update Driver->All Drivers"". Of course, after I selected it I had to point to the "SYSTEM" folder to find the two files. Mine now say "VBE Miniport - SVGA" and woks fine. ;) The only OTHER way is when you initially install via MSBATCH.INF. Installing a Driver doesn't mean it AUTOMAGICALLY gets used.

Inside the INF (this is what I selected)

[Strings]
Mfg="Anapa Corp."
AnaPa.DeviceDesc = "VBE Miniport"
<snip>
AnaPa.DeviceDesc6 = " - SVGA"

Let me guess - you don't have an Official Driver for your Video (you are Limited to 640x480/16-color) and you need the VBEMP Driver to "expand" it.

http://www.tomshardware.com/forum/7476-49-windows-colors-only

BTW, if this is in a VirtualBox VM, I found a notation here (September 2008) -

https://forums.virtualbox.org/viewtopic.php?t=9918

3. Video driver integration.

By default Windows 98 will run only in 640x480 resolution, 16-colors.

and mentions both VBEMP and SciTech drivers.

edit - Forgot to mention the INF and other two files are REQUIRED to be in the SAME FOLDER dung Install. ;)

HTH

Yes this is a Virtualbox VM. I am making a Virtualbox Guest Additions installer that uses batch to install everything. I want to make the video driver installation automatic so the user doesn't have to go into the display settings to change anything. I tried your trick but it still says 16 colors and 640x480. In Advanced, it just has the General tab and not the monitor, adapter, etc. tabs.

Edited by coolman
Link to comment
Share on other sites

Bull!

1 - Put ALL THREE FILES into a SINGLE FOLDER (Short Name, No Blanks, eg C:\VBEMP)

2 - COPY the INF file to "Windows\INF" (you already did that) because the Install (next step) does NOT copy it

3 - Create THIS BAT in THAT FOLDER

RUNDLL32 advpack.dll,LaunchINFSection <pathtofolder>\VBEMP.INF,Driver.Install
pause.

CHANGE the "<pathtofolder>" to that SINGLE FOLDERNAME (eg C:\VBEMP) and "SAVE AS" "VBEMP.BAT" inside THAT FOLDER

4 - Double-Click THAT "VBEMP.BAT" (It will copy the TWO files to WINDOWS\SYSTEM folder)

5 - Go into ControlPanel->System>DeviceManager and select/OPEN (the PLUS sign) the "Display" device

6 - Right-Click THAT DEVICE and select "Properties"

7 - Select "Update Driver" (YOU MUST UPDATE IT)

8 - Do NOT choose what IT wants, select "ALL DRIVERS"

9 - You WILL see "Anapa Corp." listed - PICK IT and you WILL see "VBE Miniport - SVGA" - PICK IT

10 - It WILL complain that its not made for Your Device - IGNORE (click OK or whatever)

11 - It WILL ask for where the OTHER two files are - NAVIGATE to the "WINDOWS\SYSTEM"

12 - It WILL ask to Reboot - DO IT!

Yes, It DOES install!!! Did I not say I already did it and it works???

post-72994-0-40479100-1359327286_thumb.j

post-72994-0-30051800-1359327304_thumb.j

and NO I did NOT do in VirtualBox!

Edited by submix8c
Link to comment
Share on other sites

Wasted post (probably)

Yes this is a Virtualbox VM. I am making a Virtualbox Guest Additions installer that uses batch to install everything. I want to make the video driver installation automatic so the user doesn't have to go into the display settings to change anything. I tried your trick but it still says 16 colors and 640x480. In Advanced, it just has the General tab and not the monitor, adapter, etc. tabs.
I've never seen that condition (just a General tab). It SHOULD at least have the Standard VGA installed (the default) "standard VGA mode 640x480x16colors".

Now for the "automatic", better do some heavy reading on MSBATCH.INF (BATCH98.EXE found on the CD in TOOLS\RESKIT\BATCH) and INFINST (INFINST.EXE found on the CD in TOOLS\RESKIT\INFINST). I DID say that the only other way than Manually is via MSBATCH.INF. ;)

BATCH98.EXE (just a whitepaper) / INFINSTD.EXE

ftp://ftp.microsoft.com./Softlib/MSLFILES/

Windows 95 RESKIT

ftp://ftp.microsoft.com/Services/TechNet/Windows/Windows95/reskit/

DOH! Windows 98 ResKit - The whole shebang! -

ftp://ftp.microsoft.com/services/technet/samples/ps/win98/reskit/

Bear in mind that you WILL more than likely have to do SOME kind of INF alterations if your intent is for it to "PnP auto-find" because I DID tell you you would/MAY get a nasty message about "not your hardware". I'm not going into that but IF you have VEN_DEV from VirtualBox it MIGHT be done (modify the INF to match). This is your project. I've provided sufficient info to get you started. MORE info is also available about "Windows (x" and "INF" files (etc) scattered throughout MSFN (details too). I'm not going to spend a lot of time searching. You do it via Google

whatever you like to "search for" site:msfn.org

edit - Found these two references -

https://forums.virtualbox.org/viewtopic.php?t=544

CPU: same as host

VESA-compilant video card

Intel 82371SB (PIIX3) IDE Interface rev 0x00

AMD Am79c973 PCnet-FAST III ethernet card

OHCI-compliant USB 1.1 interface with 8-port hub

Intel 82801AA sound card (AC'97)

ACPI-compliant power management

http://www.virtualbox.org/manual/ch03.html
Graphics. The VirtualBox graphics device (sometimes referred to as VGA device) is, unlike nearly all other emulated devices, not based on any physical counterpart. It is a simple, synthetic device which provides compatibility with standard VGA and several extended registers used by the VESA BIOS Extensions (VBE).

Have fun!

Edited by submix8c
Link to comment
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.
×
×
  • Create New...