Sinistrality Posted February 5, 2007 Share Posted February 5, 2007 (edited) Greetings all, I am having difficulties in my attempts to map a network drive during the first login attempt after XP is installed. I have attempted to map the drive via a command in the winnt.sif [GUIRunOnce] section.... [GuiRunOnce]"net use z: \\sovmtest\shared test /user:sovmtest\test /persistent:no"as well as within the RunOnceEx.cmd...@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%15 /VE /D "Mapping Network Drive" /fREG ADD %KEY%15 /V /1 /D "net use z: \\sovmtest\shared test /user:sovmtest\test /persistent:no"I've also attempted to map the drive by creating a netuse.cmd file: @echo offstart "NetUse" /wait net use z: \\sovmtest\shared test /user:sovmtest\test /persistent:noexitand placing it in the $OEM$\$1\Install folder and executing it from both Winnt.sif...[GuiRunOnce]"%systemdrive%\install\netuse.cmd"....and RunOnceEx@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%02 /VE /D "Mapping Network Drive" /fREG ADD %KEY%02 /V /1 /D "%systemdrive%\install\netuse.cmd" /fWith any of the methods shown above it is still failing to map the drive. However once the computer restarts after the RunOnceEX process completes, I can run netuse.cmd and it works correctly. And yes I have verified the credentials used to access the share are correct... User:test Password:testI came across a forum post mentioning The Workstation Service has not been started.I made the change to the hivesys.inf file as it indicated, with no effect.Any help would be appreciated.Sinistrality Edited February 6, 2007 by Sinistrality Link to comment Share on other sites More sharing options...
cluberti Posted February 6, 2007 Share Posted February 6, 2007 First, my netcheck vb script:Dim sTestPathDim intCountSet objFSO = CreateObject("Scripting.FileSystemObject")Set objShell = CreateObject("WScript.Shell")Set objVolatileEnv = objShell.Environment("VOLATILE")' An UNC path here that will be available when network connection is in place sTestPath = "\\server\share"sTestPath = "\\RISSERVER\REMINST\Setup\English\Images\WXP\UNATTEND"intCount = 1' test on volatile environment variable to avoid running logon script' if the user has already run the logon script.If Not objVolatileEnv("LogonScript") = "Done" Then Do Until objFSO.FolderExists(sTestPath) ' sleep 5 seconds WScript.Sleep 5000 intCount = intCount + 1 If intCount = 120 Then MsgBox "Unable to connect to network share for 10 minutes. Please notify your network administrator." Exit Do End If Loop ' share/folder available on server now, so continueEnd IfThen, in my unattend.cmd file, I set the following variable (should map to the RIS Server's build folder if installed from a flat image):reg query hklm\software\microsoft\windows\currentversion\setup /v sourcepath > source for /f "tokens=3 skip=3" %%1 in (source) do set sourcepath=%%1The very first thing I do in my unattend.cmd file, when configuring runonceex values, is to call the netcheck script before continuing (that way I know networking is up and I've got a valid IP, can get to the share, and things will work):SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Installing Applications (Stage 1 of 3)" /f REG ADD %KEY%01 /VE /D "Checking Network Connections" /f REG ADD %KEY%01 /V 1 /D "%systemdrive%\temp\netcheck.vbs" /f REG ADD %KEY%04 /VE /D ".NET Framework 1.1 SP1" /f REG ADD %KEY%04 /V 1 /D "%sourcepath%\UNATTEND\dotnetfx\dotnet11.exe /q:a /c:\"install /l /q\"" /f REG ADD %KEY%04 /V 2 /D "%sourcepath%\UNATTEND\dotnetfx\867460.exe /q" /f REG ADD %KEY%04 /V 3 /D "%sourcepath%\UNATTEND\dotnetfx\886903.exe /q" /f... and on, and on...The reason I do it this way is because mapping drives during runonceex is frought with danger, but accessing UNC paths seems to always "just work". Link to comment Share on other sites More sharing options...
Sinistrality Posted February 7, 2007 Author Share Posted February 7, 2007 Looks like the netcheck fails, comes up with the 10 minute warning.. Running a paused ipconfig during runonceex phase shows the following:IP Address 0.0.0.0Subnet Mask 0.0.0.0Default Gateway: BlankDHCP Server: CorrectDNS Servers: CorrectI'm thinking maybe the workstation service isn't started? Or maybe I need to do a release & renew.Guess I'll add an command to check the workstation service state... /shrugAlong with a Ipconfig /release and Ipconfig /renew...whee! Link to comment Share on other sites More sharing options...
bbmak Posted February 7, 2007 Share Posted February 7, 2007 i use this to map the drivethe format:net use z: //server_name/bbmak password /USER:username /persistent:yesnet use z: //server_name/bbmak 12345 /USER:bbmak /persistent:yesand I use a disconnect command after everything install. Link to comment Share on other sites More sharing options...
Sinistrality Posted February 7, 2007 Author Share Posted February 7, 2007 (edited) yeah... I tried that in my first post.Via the sc query lanmanworkstation command I have determined that the workstation service isn't started prior to the runonceex process execution.Nor will it allow me to start the service.I've made the change specified in JSI Tip 5638 and Error Message "The Workstation Service Has Not Been Started" When Using Cmdlines.txt with not positive effect.The result of the net use command is this:System error 67 has occuredThe network name cannot be foundNot suprising since the workstation service isn't started and the computer isn't picking up an IP address.At this point I'm inclined to start over from starting again from scratch. Or just run another runonceex.cmd after yet another reboot and start my network based installswith rundll32.exe c:\install\iernonce.dll,RunOnceExProcess(given that IE7 breaks the runonceex process, pointing it to an older version of the file thank you Microshat.)I think I'll do the latter and save my sanity's break for another day Edited February 7, 2007 by Sinistrality Link to comment Share on other sites More sharing options...
03GrandAmGT Posted February 7, 2007 Share Posted February 7, 2007 (edited) Sinistrality,Below is what I have used with no problems installing via network. I put the initial RunOnceEx.cmd in the $OEM$ folder, which is called by cmdlines.txt. Below is the system I use.cmdlines.txt[COMMANDS]"useracct.cmd""RunOnceEx.cmd"; Customized by nLite - www.nliteos.com---------------------------------------------------------------------------------------------------------------------------RunOnceEx.cmdcmdow @ /HID@echo offREG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /V RunOnceEx /D \\mercury\Installs\redstone_Apps.cmd /f---------------------------------------------------------------------------------------------------------------------------redstone_apps.cmdcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Mercury System Files & Applications" /fREG ADD %KEY%05 /VE /D "CCleaner" /fREG ADD %KEY%05 /V 1 /D "\\File-server\installs\SysApps\CCleaner\ccsetup135.exe /S" /fREG ADD %KEY%10 /VE /D "ClearType" /fREG ADD %KEY%10 /V 1 /D "\\File-server\installs\SysApps\ClearType\ClearType.exe /S /v /qn" /fREG ADD %KEY%20 /VE /D "Diskeeper" /fREG ADD %KEY%20 /V 1 /D "\\File-server\installs\SysApps\Diskeeper\DK9.msi /qn" /fREG ADD %KEY%25 /VE /D "Dot Net V1.1" /fREG ADD %KEY%25 /V 1 /D "\\File-server\installs\SysApps\DotNet_V1.1\netfx.msi /qn" /f---------------------------------------------------------------------------------------------------------------------------Hope this helps.JD Edited February 7, 2007 by 03GrandAmGT Link to comment Share on other sites More sharing options...
Sinistrality Posted February 7, 2007 Author Share Posted February 7, 2007 (edited) Thanks for your input, however I can't get around the fact that the workstation service is failing to start, no workstation=no ip address/no network. I've managed to get around it by executing a second "runonceex" at the end of my initial runonceex.cmd, because on the next reboot the network works fine Edited February 7, 2007 by Sinistrality Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now