Link to home
Start Free TrialLog in
Avatar of georgopanos
georgopanosFlag for United States of America

asked on

mounting a samba share in windows 8

I normally have  a .bat file with
net use f: /delete
net use f: \\192.168.1.2\share /USER:user password

load in the startup folder

but I have a problem when the .bat file runs, networking has not been established yet, so not connection to the server is done after boot.
Is there a solution or a better way. I want to use a script to make sure the connection is established.
Avatar of arnold
arnold
Flag of United States of America image

Is the script part of a GPO?  
You can configure/set a requirement that network be established prior to allowing login/running of scripts.

An option could be to use Preferences or GPO to push settings.
Avatar of georgopanos

ASKER

No it is a simple BAT file that is placed in the startup folder and launched.
Is the system part of a domain or is a stand alone?
Presumably wireless setup?
ASKER CERTIFIED SOLUTION
Avatar of Lionel MM
Lionel MM
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No domain, yes standalone, and no wireless. I find it hard to accept there is not something built into windows to re establish samba connections.
See if you map the drive with the reconnect option, the share will remain and should do it.
There is through local policy that the network must be established before login is allowed.
That would be very helpful where do I exactly setup the policy for establishment of network before login?
Use net use f: \\192.168.1.2\share /USER:user password /persistent:yes once. Next time, after logging in, you'll see that drive f: is mounted even if network is down. When network is up you can use drive f: without need to mount it.
I found the policy and that corrected my problem thanks.