Jump to content

Problem: Unable to map network drive at T-12


Recommended Posts

Hi,

I created an unattended XP setup, via batch\vbs scripts which i've been using for a long time. Recently I decided to change some things (cut out less components from windows), so i started with the original gold image, cut it down as necessary, and configured the scripts. Simple, right? Wrong. Drive mapping now fails at T-12, and i have no idea why!

Basically the premise is:

- cmdlines.txt: Load RunOnceEx.cmd (this works fine)

[Commands]
"rundll32 advpack.dll,LaunchINFSection nLite.inf,U"
"RunOnceEx.cmd"

- RunOnceEx.cmd: Map Z: to network location using a script that is stored on the image, and run 01PhaseOne.cmd (this doesn't work, because the drive is never mapped)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: START OF SCRIPT :: Written by Chris Joseph, 2007. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This script maps a network drive to deployment server, initializes local ::
:: logfile, and finally calls the 01PhaseOne.cmd script located on build server.::
:: ::
:: It is called from cmdlines.txt which is called at T-12 during windows setup. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


:: Minimize script
cmdow @ /min
@echo off

:: Set script constants

SET cid_path=Z:\OS\
SET phase1_log_file=%systemdrive%\maint\logs\01PhaseOne.log

:: Map network drives
cscript %systemdrive%\maint\scripts\mapdrives.vbs //NOLOGO >> %phase1_log_file%

:: Initializing log files
ECHO **************************************************************** >> %phase1_log_file%
ECHO ** Phase One Log File ****************************************** >> %phase1_log_file%
ECHO **************************************************************** >> %phase1_log_file%
ECHO ******************** Logging Started: %Date%, %Time% ** >> %phase1_log_file%
ECHO.>> %phase1_log_file%

:: Begin Phase 1
Echo %DATE% %Time% ^> Begin Phase 1^. >> %phase1_log_file%
Echo.>> %phase1_log_file%
Echo %DATE% %Time% ^> Calling Installation routines^. >> %phase1_log_file%

:: Calling installation routines.
%cid_path%01PhaseOne.cmd
EXIT

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: END OF SCRIPT ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

- mapdrives.vbs

mapdrives__blankpass_.vbs.txt

This script works perfectly fine if i run it after first login, but the drive does not map at T-12.

As you can see i've fannied about with it to try to diagnose the problem. I have confirmed that the server is online & reachable, and if i amend RunOnceEx.cmd to ping the server, and run "ipconfig /all" and dump the output to screen, this works fine. So there is no connection problem. It's only the act of connecting to a network location that does not work.

The account in question does have full access to the network location that i am trying to map.

I added some code to mapdrives.vbs to confirm that necessary services are infact running. The output from the script looks like this:

****************************************************************
** MapDrives Log File ******************************************
*********************** Logging Started: 15/10/2008, 01:47:55 **

15/10/2008 01:47:55 Instruction: Set strHostname variable
15/10/2008 01:47:55 Successful: Set strHostname variable - JNUK01C003
Logical Disk Manager = 1
Starting Service: Logical Disk Manager
HTTP SSL = 1
Starting Service: HTTP SSL
Remote Registry = 1
Starting Service: Remote Registry
Secondary Logon = 1
Starting Service: Secondary Logon
Distributed Link Tracking Client = 1
Starting Service: Distributed Link Tracking Client
Windows Time = 1
Starting Service: Windows Time
Windows Installer = 1
Starting Service: Windows Installer
IPSEC Services = 1
Starting Service: IPSEC Services
Workstation = 4
Server = 4
Wireless Zero Configuration = 1
Starting Service: Wireless Zero Configuration
SSDP Discovery Service = 1
Starting Service: SSDP Discovery Service
Task Scheduler = 1
Starting Service: Task Scheduler
15/10/2008 01:49:04 Instruction: Map UNC Path to Drive Letter
15/10/2008 01:49:04 Unsuccessful: Map UNC Path to Drive Letter - Path: \\JNUK01S001\build$, DriveLetter: Z:, ServerName: JNUK01S001, DomainName: JONET
15/10/2008 01:49:04 Error 0x800704C6: The network is not present or not started.

The "The network is not present or not started." usually appears when Client for Microsoft Networks is not installed properly, but this shouldn't be the case since everything works after first logon, and i've sucessfully mapped a drive at this stage many times before!

Any ideas anyone? I'm pulling my hair out with this one! Thanks.

CJ

Edited by oldo
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...