Jump to content

windows pe - map drives


khsh

Recommended Posts

hello, new user here. i am using windows pe to boot up a client and map a couple of drives back to a server. my winpe is configured to execute startnet.cmd with the following commands.

factory -winpe

net use f: "\\server\\share" mypassword /USER:username

i'm using dhcp specified in my [winpe.net] section of winbom.ini

when executing the net use command fails with system error 1231 (The network location cannot be reached). however, after failing if i simply type in by hand "net use f: "\\server\\share" mypassword /USER:username" it maps the drive just fine. it only fails when trying to execute it from the script. has anyone else seen this behavior or possibly knows of a solution to get the command to work from a script?

thanks!

Link to comment
Share on other sites


roger, do you recall what network command you used? it appears that the list of commands that net.exe (xp version) understands is somewhat limited. i can't see any "net initialize" like we have in dos. also, i did try the start /wait suggestion but that didn't seem to work either. it's as though the process hangs and won't finish initializing the stack until the user has interuptted the shell window in some way.

Link to comment
Share on other sites

To initialze the stack I tried several things until it started working,

I ran the net view command and then mapped my drive

I added a ping command to the startnet

basically anything to get the network to talk TCP/IP

R

Link to comment
Share on other sites

problem solved. created an executable file that logs me on to the remote machine before mapping the drives. the exe calls the Microsoft Networking API "WNetAddConnection2" inside a while loop that continually tries to connect until it hits a timeout value or successfully connects. thanks for all of your input!!

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...