Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

silent install from command line

591 views
Skip to first unread message

Sveinung Eikenes

unread,
Jan 6, 2003, 6:31:31 AM1/6/03
to
Hi

I need to perform a silent/unattended install of the directx 9.0 (redist) on
windows xp professional.I want to install directx 9 during an unattended
(RIS) installation.

With directx 8.1 i used the following parameters:
dxsetup /silent /install

I cannot find the correct command line parameters for directx 9. Can anyone
help me?
Thank you.

Sveinung


Stan Pennington [MS]

unread,
Jan 6, 2003, 3:15:14 PM1/6/03
to
There is no supported command line silent install for the DirectX 8.x or 9.0
redistribution packages. Vendors needing to modify the standard behavior of
dxsetup.exe are required to use the DirectSetup functionality included in
the SDK. Please review the "Customizing Setup" topic on implementation of a
callback function. Documentation and samples are provided.

Stan Pennington
DirectShow Program Manager

This posting is provided "AS IS" with no warranties, and confers no rights.


"Sveinung Eikenes" <sveinung...@curriculum.no> wrote in message
news:e6EhQcXtCHA.1844@TK2MSFTNGP09...

Patrick J. LoPresti

unread,
Jan 6, 2003, 11:22:13 PM1/6/03
to
"Stan Pennington [MS]" <stan...@online.microsoft.com> wrote in message news:<uaW3KBctCHA.1628@TK2MSFTNGP10>...

> There is no supported command line silent install for the DirectX 8.x or 9.0
> redistribution packages. Vendors needing to modify the standard behavior of
> dxsetup.exe are required to use the DirectSetup functionality included in
> the SDK. Please review the "Customizing Setup" topic on implementation of a
> callback function. Documentation and samples are provided.

You are joking, right?

I am not a "vendor", I am a systems administrator. I want to install
this thing on a large number of systems without user intervention. Do I
need to compile my own installer for this?

That sucks, even by Microsoft's usual standards. Nice work.

- Pat

Sveinung Eikenes

unread,
Jan 7, 2003, 3:05:17 AM1/7/03
to
To Microsoft:

Either you have to enable command line silent install for the DirectX 9.0
redistribution package, or you have to support a full download of the
DirectX 9.0 runtime and silent install for this.

Is there a way to download the whole DirectX 9.0 runtime and use a silent
install? I have not managed to find a way to download all files used by the
Active Setup for later use. With Internet Explorer you could use alot of
parameters to download the installation files.

Sveinung

"Patrick J. LoPresti" <pa...@users.sourceforge.net> wrote in message
news:58ba8c1e.03010...@posting.google.com...

LAi

unread,
Jan 8, 2003, 10:12:23 AM1/8/03
to
You can replace the dxsetup.exe from 9.0 with the one of version 8.1b;
the /windowsupdate parameter still works for unattend setup;

I don't know if the setup is realy done right but it looks fine;

greets LAi

David Clark

unread,
Jan 8, 2003, 12:26:08 PM1/8/03
to
I agree thats pathetic, I have 6000 machines that need
updating :(

Dave

>.
>

Mike Gamble [MS]

unread,
Jan 8, 2003, 2:24:27 PM1/8/03
to
I would not advise using the 8.1 dxsetup.exe to install DX9. You definitely
will not get managed DX. Who knows what else will be broken.

--

This posting is provided "AS IS" with no warranties, and confers no rights.

"LAi" <l...@uboot.com> wrote in message
news:e8f0984e.03010...@posting.google.com...

Sveinung Eikenes

unread,
Jan 9, 2003, 3:00:51 AM1/9/03
to
TO MICROSOFT: When will you provide a solution???? We are awaiting your
answer!

Sveinung


"Stan Pennington [MS]" <stan...@online.microsoft.com> wrote in message
news:uaW3KBctCHA.1628@TK2MSFTNGP10...

LAi

unread,
Jan 9, 2003, 5:59:03 AM1/9/03
to
I have 2000 machines that need the update ;-( so I have
nearly the same problem;

I took a closer look to the 81b dxsetup.exe in the 9.0 kit
and found out that it uses the setup routines from the
dsetup32.dll ( like it is sugested in the DirectX Costum Setup
from the SDK ) so it looks like a complede Standart setup to me;

if there is any other official way please tell me !

and To MS ... if you open the dxsetup.exe ( from the 9.0 kit)
with a hex editor you can still find the /windowsupdate command
line parameter ... so it is still there ... why doesn't it work?

Mike Gamble [MS]

unread,
Jan 9, 2003, 4:49:24 PM1/9/03
to
You can use the DirectX Setup API , DirectXSetup(), to install the runtime
silently.

--

This posting is provided "AS IS" with no warranties, and confers no rights.
"Sveinung Eikenes" <sveinung...@curriculum.no> wrote in message

news:uGtyeU7tCHA.2496@TK2MSFTNGP10...

Sveinung Eikenes

unread,
Jan 10, 2003, 8:09:41 AM1/10/03
to
You have to understand that system administrators are not developers! They
only need to distribute DirectX to their client computers using some kind of
solution, such as SMS or Group Policies etc. You cannot expect that they sit
down and learn how to program and compile a workable solution. Why did you
remove the command line support?

You could:
1)
Provide a MSI file for directx 9 runtime (the redist msi requires .net
framework). Microsoft introduced the MSI, and supports distributing MSI
packages through Group Policies and SMS.
2)
Provide command line support. Why not continue the support?
3)
Distribute DirectX 9 through Windows Update and Software Update Services.


Your answer "You can use the DirectX Setup API , DirectXSetup(), to install
the runtime silently." do unfortunately not help me at all.

Sveinung

"Mike Gamble [MS]" <dir...@microsoft.com> wrote in message
news:OdMXxjCuCHA.2876@TK2MSFTNGP09...

LAi

unread,
Jan 10, 2003, 8:53:38 AM1/10/03
to
Hallo Mike !

this is the 3rd time you suggested we should use the
the DirectX Setup API ( DirectXSetup() ) please tell me
the secret how can I do this on command line ?
can I use a rundll32.exe call ? yes ?

please post the command line for us ...

because i don't want to start my C compiler to do the
work we pay mircosoft for ...

so this is one outstanding chance to show us that
there is more than hot air in redmond;

greets Lai;

"Mike Gamble [MS]" <dir...@microsoft.com> wrote in message news:<OdMXxjCuCHA.2876@TK2MSFTNGP09>...

Jerry Ham

unread,
Jan 13, 2003, 3:12:45 PM1/13/03
to

You are totally joking, right?

After looking at this install, hacking it in notepad, digging through the
INF files, etc. I guess you aren't. However, this product can't even have a
WinXP logo, as it DOESN'T EVEN USE THE WINDOWS INSTALLER (except for the
small piece for the .Net managed DX). We distribute updates like Service
Packs, Q articles (security fixes, etc) and DirectX updates to 43,000
machines SILENTLY. Not with the user having to answer prompts. This seems
very consumer focused.

When will there be an XP version on the Windows Update catalog that has
silent support so that we can push this out with SMS to all of our users?

Thanks!
Jerry Ham

"Stan Pennington [MS]" <stan...@online.microsoft.com> wrote in message
news:uaW3KBctCHA.1628@TK2MSFTNGP10...

Jerry Ham

unread,
Jan 13, 2003, 9:47:48 PM1/13/03
to
BTW,

I did go ahead and compile a quick VB app that uses the DirectSetup API as
the MS post had suggested. It only took about 30 minutes to do. The results
are pretty good. There are no prompts for the user to answer, although a
progress bar does come up (but has NO CANCEL BUTTON - so this is good enough
for my deployment).

Anyway, it is still ridiculous not to have the options built in (and not
using Windows Installer is pretty bad too), but the option described does
work and is fairly simple to implement.

Jerry Ham

"Jerry Ham" <Jerry...@cvx.net> wrote in message
news:OsUSaA0uCHA.2028@TK2MSFTNGP11...

Jeramie Lorson

unread,
Jan 14, 2003, 8:07:45 PM1/14/03
to
Jerry,

That sounds like it would work great for what I need. I just have a
few questions.

1. Do I have to download the 200+ Mb SDK to do this?

2. Is there good documentation on how to acomplish it.

I simply want to include this silent install into my installation of
Windows XP Pro on one computer. Since I work for a computer hardware
website. I find myself reinstalling WIndows XP on my computer quite
often so that I can get the most accurate results out of new hardware
that I review. To save time I make my own cutom installations of XP.
If you can offer me any advise on how to achive this it would be
greatly appreciated.

Thanks,
Jeramie Lorson

On Mon, 13 Jan 2003 18:47:48 -0800, "Jerry Ham" <Jerry...@cvx.net>
wrote:

Jerry Ham

unread,
Jan 15, 2003, 11:20:39 AM1/15/03
to
Jeramie,

I coded this in VB.Net, so the .Net Framework needs to be installed for it
to work, but I will put the code that I used in this note. If you have VB6,
the code can easily be converted to run there. If you do download the whole
SDK, it does have all the information - it is written for C++ though. The
docs were pretty thorough.

Here's the code I used in VB.Net (note that all the MoveWindow stuff is
because we have our own install screens running and the darn window kept
popping up in front of ours - you probably don't need to implement that
piece):

Option Explicit On
Option Strict On

Imports System.Runtime.InteropServices
Imports Microsoft.Win32
Imports System.Windows.Forms

Public Class cDXSetup


'===========================================================================
=======================================
'GILDX9Setup.exe - this program uses the DirectSetup API to over-ride
the standard DirectX 9 setup. The standard
'setup was obviously written by an idiot as it does not support any
silent modes. According to the DirectX SDK
'(downloadable from Microsoft), the only way to achieve a quiet mode or
silent mode install is to implement a
'program to call the DirectSetup API and create a callback function that
the API can use to allow your app to
'create its own dialogs (and then just don't create them).

'This is what is done here. In fact, since we just return 0 for every
call to our callback function, the
'Microsoft code just displays a dialog with no cancel buttons and no
input required - which is just what we want!

'===========================================================================
========================================


Private Declare Ansi Function DirectXSetupA Lib "DSetup.dll" (ByVal hWnd
As Integer, ByVal lpszRootPath As String, ByVal dwFlags As Integer) As
Integer
Private Declare Auto Function DirectXSetupSetCallback Lib "DSetup.dll"
(ByVal x As CallBack) As Integer
Private Declare Auto Function GetDesktopWindow Lib "User32.dll" () As
Integer

Private Declare Ansi Function FindWindow Lib "user32.dll" Alias
"FindWindowA" (ByVal lpClassName As Integer, ByVal lpWindowName As String)
As Integer
Private Declare Auto Function MoveWindow Lib "user32.dll" (ByVal hWnd As
Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer,
ByVal nHeight As Integer, ByVal bRepaint As Integer) As Integer


'// DSETUP Error Codes, must remain compatible with previous setup.
Private Const DSETUPERR_SUCCESS_RESTART As Integer = 1
Private Const DSETUPERR_SUCCESS As Integer = 0
Private Const DSETUPERR_BADWINDOWSVERSION As Integer = -1
Private Const DSETUPERR_SOURCEFILENOTFOUND As Integer = -2
Private Const DSETUPERR_NOCOPY As Integer = -5
Private Const DSETUPERR_OUTOFDISKSPACE As Integer = -6
Private Const DSETUPERR_CANTFINDINF As Integer = -7
Private Const DSETUPERR_CANTFINDDIR As Integer = -8
Private Const DSETUPERR_INTERNAL As Integer = -9
Private Const DSETUPERR_UNKNOWNOS As Integer = -11
Private Const DSETUPERR_NEWERVERSION As Integer = -14
Private Const DSETUPERR_NOTADMIN As Integer = -15
Private Const DSETUPERR_UNSUPPORTEDPROCESSOR As Integer = -16
Private Const DSETUPERR_MISSINGCAB_MANAGEDDX As Integer = -17
Private Const DSETUPERR_NODOTNETFRAMEWORKINSTALLED As Integer = -18
Private Const DSETUPERR_CABDOWNLOADFAIL As Integer = -19

Private Const DSETUP_DDRAWDRV As Integer = &H8 '/* install
DirectDraw Drivers */
Private Const DSETUP_DSOUNDDRV As Integer = &H10 '/* install
DirectSound Drivers */
Private Const DSETUP_DXCORE As Integer = &H10000 '/*
install DirectX runtime */
Private Const DSETUP_DIRECTX As Integer = DSETUP_DXCORE Or
DSETUP_DDRAWDRV Or DSETUP_DSOUNDDRV
Private Const DSETUP_MANAGEDDX As Integer = &H4000 '/*
install managed DirectX */
Private Const DSETUP_TESTINSTALL As Integer = &H20000 '/* just
test install, don't do anything */


'//******************************************************************
'// DirectX Setup Callback mechanism
'//******************************************************************

'// DSETUP Message Info Codes, passed to callback as Reason parameter.
Private Const DSETUP_CB_MSG_NOMESSAGE As Integer = 0
Private Const DSETUP_CB_MSG_INTERNAL_ERROR As Integer = 10
Private Const DSETUP_CB_MSG_BEGIN_INSTALL As Integer = 13
Private Const DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME As Integer = 14
Private Const DSETUP_CB_MSG_PROGRESS As Integer = 18
Private Const DSETUP_CB_MSG_WARNING_DISABLED_COMPONENT As Integer = 19


<StructLayout(LayoutKind.Sequential)> _
Private Class DSETUP_CB_PROGRESS
Public dwPhase As Integer
Public dwInPhaseMaximum As Integer
Public dwInPhaseProgress As Integer
Public dwOverallMaximum As Integer
Public dwOverallProgress As Integer
End Class


Private Enum DSETUP_CB_PROGRESS_PHASE
DSETUP_INITIALIZING = 0
DSETUP_EXTRACTING = 1
DSETUP_COPYING = 2
DSETUP_FINALIZING = 3
End Enum

Public Shared bDoMove As Boolean = False

Public Delegate Function CallBack(ByVal dwReason As Integer, ByVal
dwMsgType As Integer, ByVal lpszMessage As Integer, ByVal lpszName As
Integer, ByVal lpInfo As Integer) As Integer

Public Shared Sub Main()
Dim iRes As Integer, hWnd As Integer, sCmd As String
Dim dwFlags As Integer
sCmd = UCase(Command())

If InStr(1, sCmd, "/?") > 0 Then
Dim sMsg As String

sMsg = "Usage:" & vbCrLf & vbCrLf & "GILDX9Setup.exe {/TEST}
{/SCREEN}" & vbCrLf & vbCrLf & "where /TEST doesn't actually do an install -
it just tests it." & vbCrLf & "and /SCREEN reports success or failure to the
screen." & vbCrLf & vbCrLf & "Note: this program will create:" & vbCrLf &
"C:\Program Files\Chevron\GIL Wise Logs\GILDX9Setup.ini" & vbCrLf & "which
contains the results of the intstall. It also returns exit" & vbCrLf & "code
0 for success and exit code 1 for failure."
MessageBox.Show(sMsg, "GILDX9Setup", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Return
End If

If InStr(1, sCmd, "/NOMOVE") > 0 Then
bDoMove = False
Else
bDoMove = True
End If

hWnd = GetDesktopWindow
iRes = DirectXSetupSetCallback(AddressOf
DirectXSetupCallbackFunction)
dwFlags = DSETUP_DIRECTX Or DSETUP_MANAGEDDX
If InStr(1, sCmd, "/TEST") > 0 Then dwFlags = dwFlags Or
DSETUP_TESTINSTALL
iRes = DirectXSetupA(hWnd, vbNullString, dwFlags)
Select Case iRes
Case DSETUPERR_SUCCESS
'Success
SaveResults(True, False, iRes)
If InStr(1, sCmd, "/SCREEN") > 0 Then
MessageBox.Show("Successful DX9 install!",
"GILDX9Install")
End If
System.Environment.ExitCode = 0

Case DSETUPERR_SUCCESS_RESTART
'Success
SaveResults(True, True, iRes)
If InStr(1, sCmd, "/SCREEN") > 0 Then
MessageBox.Show("Successful DX9 install (reboot
required)!", "GILDX9Install")
End If
System.Environment.ExitCode = 0

Case Else
'error
SaveResults(False, False, iRes)
If InStr(1, sCmd, "/SCREEN") > 0 Then
MessageBox.Show("DX9 Install failed with code: " &
Trim(Str(iRes)), "GILDX9Install")
End If
System.Environment.ExitCode = 1
End Select

Return
End Sub

Public Shared Function DirectXSetupCallbackFunction(ByVal dwReason As
Integer, ByVal dwMsgType As Integer, ByVal lpszMessage As Integer, ByVal
lpszName As Integer, ByVal lpInfo As Integer) As Integer
'Don't give a crap about the data, and don't care to have a dialog
display! So - return 0

'Move the window out of the way of our Wise script background
Select Case dwReason
Case DSETUP_CB_MSG_PROGRESS
If bDoMove = True Then MoveWindowAround()
End Select
Return 0
End Function

Public Shared Sub MoveWindowAround()
Dim hWnd As Integer
Dim iWidth As Integer, iHeight As Integer
hWnd = FindWindow(0, "Installing Microsoft(R) DirectX(R)")
If hWnd <> 0 Then
MoveWindow(hWnd, 350, 300, 366, 218, 1)
End If

End Sub

Public Shared Sub SaveResults(ByVal bSuccess As Boolean, ByVal
bRebootRequired As Boolean, ByVal iCode As Integer)
Dim sFolder As String

sFolder =
System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) &
"\Chevron\GIL Wise Logs"
Try
MkDir(sFolder)
Catch
End Try

Dim sFile As String
sFile = sFolder & "\GILDX9Setup.ini"

Try
Dim sr As New System.IO.StreamWriter(sFile, False)
sr.WriteLine("[Setup]")
sr.WriteLine("Successful=" & Trim(Str(bSuccess)))
sr.WriteLine("RebootRequired=" & Trim(Str(bRebootRequired)))
sr.WriteLine("ReturnCode=" & Trim(Str(iCode)))
sr.Close()
Catch
End Try

End Sub

End Class


"Jeramie Lorson" <jeramie...@hytekcomputer.com> wrote in message
news:3e24b017...@news.socket.net...

Jeramie Lorson

unread,
Jan 15, 2003, 8:31:04 PM1/15/03
to
Thanks for sharing Jerry. It's much appreciated.

On Wed, 15 Jan 2003 08:20:39 -0800, "Jerry Ham" <Jerry...@cvx.net>

0 new messages