Computer Startup script being terminated, possibly due to a timeout ?

Discussion in 'Scripting' started by Alex, Sep 12, 2008.

  1. Alex

    Alex Guest

    Hi. We have a number of Windows 2000 SP4 workstations which require DirectX
    9 (currently on DirectX 7) to be installed as a prerequisite for some
    additional software we are rolling out. I have created a simple batch
    script which copies the installer form a central file share, expands the
    files to the %temp% directory, executed the installer silently and then
    cleans up all the files. Everything works when testing the script/install
    logged onto a workstation, although the install/update appears to be taking
    20-25 minutes, there are no errors and DirectX 9 is successfully installed.

    When I call the script as a computer startup script, the script again
    executes fine and from the DirectX log file appears to running as expected
    for ~5 minutes. After 5 minutes Windows then continues to boot and displays
    the login screen. On checking the DirectX log file the installation appears
    to have been terminated after 5 mintues even though the install hadn't
    finished. There are no errors in the DirectX log, it's just as thought the
    installation process was killed off.

    Can anyone tell me what I'm doing wrong ? I'm not sure why DirectX is
    taking as long to install/update, but is there a timeout on how long a
    startup script can take to execute and complete ?

    Thanks,
    Alex.
     
    Alex, Sep 12, 2008
    #1
    1. Advertisements

  2. I wonder why you post your question here, seeing that this is a VB Scripting
    newsgroup and you're running a batch file. Or did you perhaps mean "VB
    Script" when you wrote "batch script"? Anyway, there is no timeout built
    into the logon process. You should capture the output from your batch file
    like so in order to find out what's going on:

    call InstallDirectX.bat 1>>c:\install.log 2>>&1

    Inserting a "pause" command at the end of the batch file might help too.
     
    Pegasus \(MVP\), Sep 12, 2008
    #2
    1. Advertisements

  3. Also, remember that Startup scripts run with the permissions of the local
    system. There is no user. This means the script should have permissions to
    install software locally, but not have any permissions elsewhere in the
    network. Sometimes you must grant permissions to the computer object for
    network shares, for example. When this is necessary I grant permissions to
    the group "Domain Computers". If the script runs fine when you run it, the
    problem is most likely permissions. Also, the script must run silently.
     
    Richard Mueller [MVP], Sep 12, 2008
    #3
  4. AFAIR, startup scripts run within the context of the user logging on, not
    the local system. This means that they can access networked resources, e.g.
    roaming profiles.
     
    Pegasus \(MVP\), Sep 12, 2008
    #4
  5. Startup scripts (configured in GPO) run before a user logs on. When my
    startup script writes to a log file in a share, I must grant permissions in
    the share to "Domain Computers" (or to the individual computer objects)
    before it works.
     
    Richard Mueller [MVP], Sep 12, 2008
    #5
  6. I was thinking of startup scripts invoked by means of the user's account
    profile (usually called the "Logon script").
     
    Pegasus \(MVP\), Sep 12, 2008
    #6
  7. Alex

    Al Dunbar Guest

    But those are always called logon scripts, as they run at logon time.
    Startup scripts are called startup scripts because they run at startup time.

    /Al
     
    Al Dunbar, Sep 13, 2008
    #7
  8. Doh!
     
    Pegasus \(MVP\), Sep 13, 2008
    #8
  9. Alex

    Alex Guest

    Thanks for the replies. At the moment I have used a batch script as I just
    wanted to check that the principal for upgrading directx 9 silently this way
    was suitable, I was then going to move it to a vbscript. The batch script I
    was using is below :

    start /wait \\fileserver\distributions\directx9\directx_aug2008_redist.exe
    /Q /T:"%temp%\DX9\" > c:\dxInstall1.log 2>>&1
    start /wait %temp%\DX9\DXSETUP.exe /silent > c:\dxInstall2.log 2>>&1
    del %temp%\DX9\" /F /S /Q
    rd "%temp%\DX9\" /Q

    As explained in my original post if I run the above batch script while
    logged in with administrative rights the directx upgrade runs without
    problem and I've confirmed the upgrade was successful (the batch script and
    files are all located on a file server, permissions have been setup to allow
    access as Administrator as well as Domain Computers). The install does take
    a long time ~40 minutes, I'm not sure if this is becuase I'm testing inside
    a virtual machine, or just the amount of time it takes for a directx
    upgrade. If I assign the above script as a startup script, it starts
    running fine, the redist.exe is expanded to the local %temp%\DX9\ and
    dxsetup then continues for ~18minutes producing the same directx.log file as
    running the install locally. After ~18 mintues the installation then just
    appears to terminate, there are no errors and the installation is not
    complete. The dxInstall1.log and dxInstall2.log are always empty. The
    official directx.log contains the same entries as the local installation,
    but it just gets terminated after ~18 minutes, there are no errors in the
    log.

    Can anyone suggest what I'm doing wrong ?

    Thanks,
    Alex.
     
    Alex, Sep 15, 2008
    #9
  10. <snip>

    Since you're using a batch file, all of your crossposts are inappropriate. I
    suggest you repost in microsoft.public.win2000.cmdprompt.admin and in
    alt.msdos.batch.nt. After you have resolved the batch file issue and if you
    still have a problem, post your update here.
     
    Pegasus \(MVP\), Sep 15, 2008
    #10
  11. Alex

    Al Dunbar Guest

    First, Pegasus is correct about a batch script problem being off topic in
    the .wsh and .vbscript groups.

    That said, how is the 40 minute install time split between the *redist.exe
    and the dxsetup.exe commands? If this is a timing/timeout thing, perhaps you
    could simply copy the files that *redist.exe generates in advance to the
    computer, and have the startup job just run dxsetup.exe

    /Al
     
    Al Dunbar, Sep 16, 2008
    #11
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.