You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
Ok, we have 2 networks/domains, and i want to connect to the second network and auto logon from a bat file
Ok so i have this:
NET USE \\serverName1\FolderOnServer /USER:theDomain\username password
This one works fine, but my problem is the second server is a SQL server and has no shaired folders etc...
so if i use this:
NET USE \\serverName2 /USER:theDomain\username password
It dont work because it has no folder...
The I only want to login to the server, and as such no need to have a mapped drive. So I want to login using a .bat file from the second netowrk/domain...
Why do you need to log onto the sql server?
Bit confused as to what you are trying to achieve?
You are talking about windows networking, right? Which is about file sharing. So if there are no shared folders, what're you trying to log on to do?
It is a bit(lot) complicated, I will try and explain... It is all very political why it is like this but it has to be etc...
We have 2 networks both using difrent domain controlers and DNS addresses etc...
Net1 : All the Managers/Admin of the computers are on this network.
Net2 : All the Staff computer's are on this and the main application is run on this server.
We have installed the application from net2 on net1 and it tryed to look as there server name and not the IP addressm to get round this we added the hostname and ip address to the 'host' file, so now i can type in windows explorer the server name i.e. \\net1 It then asks me for a user name and password so i can connect to net2 (all usernames and passwords are difrent on each server)
and when i have done \\net1 in explorer and entered the username and password i can thenload the application because it thinks i am still logged on.
So all i realy need to do is automate this process...
If that make any sence at all...
try -
NET USE \\serverName2\ipc$ /USER:theDomain\username password
Try
\\servername /user:username password
Is is the SQL app which is having difficulty logging on?
Or are you trying to mount a windows admin network share?
Actually, all windoze machines have shared drives - c$. You can use that.
Or you can share the directory on the host where the app is resident
Or if you want to use the server to distribute an application, you create an \install directory with RO rights then put everything you want to distribute in there, including an install.bat which is called from the get.bat
smeg - I though I tryed that, but I think I was puting a drive in there but now I have removerd the drive letter it works great 🙂
Cheers all