CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: inf files

  1. #1
    Join Date
    Nov 1998
    Posts
    1

    inf files



    Is there a way to use rundll32.exe to install an inf file? We need to get the vb 5 runtime installed without user intervention and without a special setup program. An inf file is working, but we need a way to be able to install it from the command line. Any help would be very appreciated. If you reply to my message, remove everything but colubs.com from my address.


    Thanks! Jeremy

  2. #2
    Join Date
    Apr 1999
    Posts
    5

    Re: inf files



    From a command line program, I would think that you can call the ShellExecute function, using the proper action (i.e. "Install") as the lpOperation parameter and the path to the .INF file.


    The VB Declaration is below:

    Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


    VC++ prototype is below:

    HINSTANCE ShellExecute( HWND hwnd, // handle to parent window

    LPCTSTR lpOperation, // pointer to string that specifies operation to perform

    LPCTSTR lpFile, // pointer to filename or folder name string

    LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters

    LPCTSTR lpDirectory, // pointer to string that specifies default directory

    INT nShowCmd // whether file is shown when opened

    );





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured