script on xp comp

G

Guest

can anyone create or is there a site on how to make a simple logon script for
me so i stay connected to my home network. just workgroup no domain. where
would a place the script/what extension.
any help is greatly appreciated !!!
 
R

Robert L [MS-MVP]

these may help. quoted from http://www.ChicagoTech.net
Example of VBScript - Mapping a network drive based on the group

' Map a network drive if the user is a member of the group.
' Alert the user if the drive cannot be mapped.
If IsMember(objUser, "accounting") Then
If Not MapDrive("Q:", "\\chicagotech\data") Then
MsgBox "Unable to Map Q: to AdminShare"
End If
End If

Example of batch file

net use h: \\hostname\sharedname

Where is logon script located

By default, on Windows NT 3.x and 4.0 DC and workstations, the
%SystemRoot%\System32\Repl\Import\Scripts folder is shared as NETLOGON for
saving logon script. On Windows 2000/2003 servers, the
%SystemRoot%\Sysvol\Sysvol\domainname\Scripts folder is shared as NETLOGON.
On Windows 2000/XP workstation, the default location for local logon scripts
is the %Systemroot%\System32\Repl\Imports\Scripts folder. The
%Systemroot%\System32\Repl\Imports\Scripts folder is not created on a new
installation of Windows. Therefore, the
%SystemRoot%\System32\Repl\Imports\Scripts folder must be created and shared
out with the share name netlogon.


--
For more and other information, go to http://www.ChicagoTech.net

Don't send e-mail or reply to me except you need consulting services.
Posting on MS newsgroup will benefit all readers and you may get more help.

Bob Lin, MS-MVP, MCSE & CNE
Networking, Internet, Routing, VPN, Anti-Virus, Tips & Troubleshooting on
http://www.ChicagoTech.net
Networking Solutions, http://www.chicagotech.net/networksolutions.htm
VPN Solutions, http://www.chicagotech.net/vpnsolutions.htm
VPN Process and Error Analysis, http://www.chicagotech.net/VPN process.htm
VPN Troubleshooting, http://www.chicagotech.net/vpn.htm
This posting is provided "AS IS" with no warranties.
 
G

Guest

hello!!!!
tired creating a batch file ....
@echo off
net use /persistent:no
net use x:\\server\shared
net use x:\\server\home folder
was place on the following\document and settings\all users\start
menu\programs\startup\netlogon.bat (m using an xp machine). i have mapped the
drive at first to make sure it is connecting then created the netlogon batch
file. i got system error 67. network path not found. this error was after i
restarted the machine to test. you guys have an idea on how i can make this
work. please advise!!!!
 
G

Guest

hello!!!!
tried creating this batch file ....
@echo off
net use /persistent:no
net use x:\\server\shared
net use x:\\server\home folder
was place on the following... \document and settings\all users\start
menu\programs\startup\netlogon.bat (m using an xp machine). i have mapped the
drive at first to make sure it is connecting then created the netlogon batch
file. i got "system error 67 network path not found". this error was after i
restarted the machine to test. any idea on how i can make this work. i made
sure the correct drive are mapped... then this error .... please advise!!!!
 
R

Richard G. Harper

If this is the exact batch file you have a problem. You can't map two
drives to the same drive letter. The error 67 means exactly what it says,
one of the two lines that start with 'net use x:' is not pointing to a
proper share. Try typing each line in a command window and see which one
causes the error. But first change one of those 'x's to a different drive
letter.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm
 
G

Guest

thanks for your reply richard !
my bad, on the batch file they're on a different drive letters. i just
noticed that when i click the workgroup, it is suddenly not accesible so i
have to search for the computer (server) before it comes up only then i could
map the drive. i guess that may be reason why am getting error 67. but
still, if i have already mapped it previously it should reconnect at logon?
Please advise !!!! Again thanks for your response.

Richard G. Harper said:
If this is the exact batch file you have a problem. You can't map two
drives to the same drive letter. The error 67 means exactly what it says,
one of the two lines that start with 'net use x:' is not pointing to a
proper share. Try typing each line in a command window and see which one
causes the error. But first change one of those 'x's to a different drive
letter.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


samrod said:
hello!!!!
tired creating a batch file ....
@echo off
net use /persistent:no
net use x:\\server\shared
net use x:\\server\home folder
was place on the following\document and settings\all users\start
menu\programs\startup\netlogon.bat (m using an xp machine). i have mapped
the
drive at first to make sure it is connecting then created the netlogon
batch
file. i got system error 67. network path not found. this error was after
i
restarted the machine to test. you guys have an idea on how i can make
this
work. please advise!!!!
 
R

Richard G. Harper

I don't know why you have the 'net use /persistent:no' line in that batch
file, especially if you want to re-connect to shared folders when you
reboot. That command maps shared folders for a single session only. Get
rid of it, instead change your sharing commands to read:

net use x: \\server\shared /persistent:yes

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


samrod said:
thanks for your reply richard !
my bad, on the batch file they're on a different drive letters. i just
noticed that when i click the workgroup, it is suddenly not accesible so
i
have to search for the computer (server) before it comes up only then i
could
map the drive. i guess that may be reason why am getting error 67. but
still, if i have already mapped it previously it should reconnect at
logon?
Please advise !!!! Again thanks for your response.

Richard G. Harper said:
If this is the exact batch file you have a problem. You can't map two
drives to the same drive letter. The error 67 means exactly what it
says,
one of the two lines that start with 'net use x:' is not pointing to a
proper share. Try typing each line in a command window and see which one
causes the error. But first change one of those 'x's to a different
drive
letter.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


samrod said:
hello!!!!
tired creating a batch file ....
@echo off
net use /persistent:no
net use x:\\server\shared
net use x:\\server\home folder
was place on the following\document and settings\all users\start
menu\programs\startup\netlogon.bat (m using an xp machine). i have
mapped
the
drive at first to make sure it is connecting then created the netlogon
batch
file. i got system error 67. network path not found. this error was
after
i
restarted the machine to test. you guys have an idea on how i can make
this
work. please advise!!!!








:

can anyone create or is there a site on how to make a simple logon
script
for
me so i stay connected to my home network. just workgroup no domain.
where
would a place the script/what extension.
any help is greatly appreciated !!!
 
G

Guest

oopppss, anyway, i've use net use on the command prompt to see if it is
connecting ...same error. i ahave also resolved the other issue "workgroup
not accesible" i now can see all my computers. i just wont reconnect at
logon. i have also tried net config server /autodisconnect:-1 ( (checked on
net help to make sure i am executing a right command) so it wont drop the
connection when idle (m getting a syntax error). so, so confused!!!

Richard G. Harper said:
I don't know why you have the 'net use /persistent:no' line in that batch
file, especially if you want to re-connect to shared folders when you
reboot. That command maps shared folders for a single session only. Get
rid of it, instead change your sharing commands to read:

net use x: \\server\shared /persistent:yes

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


samrod said:
thanks for your reply richard !
my bad, on the batch file they're on a different drive letters. i just
noticed that when i click the workgroup, it is suddenly not accesible so
i
have to search for the computer (server) before it comes up only then i
could
map the drive. i guess that may be reason why am getting error 67. but
still, if i have already mapped it previously it should reconnect at
logon?
Please advise !!!! Again thanks for your response.

Richard G. Harper said:
If this is the exact batch file you have a problem. You can't map two
drives to the same drive letter. The error 67 means exactly what it
says,
one of the two lines that start with 'net use x:' is not pointing to a
proper share. Try typing each line in a command window and see which one
causes the error. But first change one of those 'x's to a different
drive
letter.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm


hello!!!!
tired creating a batch file ....
@echo off
net use /persistent:no
net use x:\\server\shared
net use x:\\server\home folder
was place on the following\document and settings\all users\start
menu\programs\startup\netlogon.bat (m using an xp machine). i have
mapped
the
drive at first to make sure it is connecting then created the netlogon
batch
file. i got system error 67. network path not found. this error was
after
i
restarted the machine to test. you guys have an idea on how i can make
this
work. please advise!!!!








:

can anyone create or is there a site on how to make a simple logon
script
for
me so i stay connected to my home network. just workgroup no domain.
where
would a place the script/what extension.
any help is greatly appreciated !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top