Solved

auto log in script

Posted on 2004-09-17
4
148 Views
Last Modified: 2013-12-04
I have three PCs on a workgroup called MAD-BIKERS. They are all using windows XP pro SP2. The connection is on a wireless network. At the moment there are two shares on one of the pcs called dfsroot$. When the user logs on to another pc with their log on if I map to the share from there PC using my log on to connect i map succesfully. But if they reboot there PC it looses the connection needing me to VNC to there PC and insert my password to map. This is fine after i enter my password but i was wondering can i run a log in script to map as they log on? I have tried adding accounts to the log on as a service but no luck. I know if it was a domain I wouldnt have the problem as security is centrally controlled
0
Comment
Question by:chorley200
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
jimmybartlett earned 500 total points
ID: 12085407
you could write a short batch file that includes the NET USE command. This would allow you to actually hard code your credentials into the file. Now, this is not recommended, as the user could easily find the batch file and read it in notepad to discover your password, so the solution may be to create a user with elevated privileges that can map the drive but has no system admin rights. then use that user's username and pw to map the drive in that batch file.   you could make the username and password some really cryptic characters so that a layman reading the script would not recognize them as a username and password.
NET USE syntax:
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [/SMARTCARD]
        [/SAVECRED]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]

actually, after looking at the syntax printout, it looks like you could just have it save your credentials. You could put in your pw the first time and after that it would do it automatically. Try it with the /savecred switch.
let me know if this helps.
0
 
LVL 1

Expert Comment

by:markoidwilson
ID: 12086970

Not sure if i have got the question right but...If you create all of your users locally on each PC with the same passwords this may solve your authentication problems. No need to worry about logon scripts
0
 
LVL 1

Expert Comment

by:jimmybartlett
ID: 12087015
Chorley200 is trying to map drives that are not accessible to the users as a default. They need elevated privileges. the login that the users have now is not privileged enough to gain access to that resource.
0
 
LVL 1

Expert Comment

by:markoidwilson
ID: 12090794
jimmy your idea is quite right.

But why not then grant permissons on the share ?
Map the drive by going into windows explorer/tools/map network drive and keep the reconnect at logon box ticked.
See where I was going with that one..
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
Article by: btan
The intent is not to repeat what many has know about Ransomware but more to join its dots of what is it, who are the victims, why it exists, when and how we respond on infection. Lastly, sum up in a glance to share such information with more to help…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question