PC Review


Reply
Thread Tools Rate Thread

Batch File Logon Script

 
 
spikestik
Guest
Posts: n/a
 
      6th Apr 2004
I am having trouble accomplishing the following:
I want the following Logon Script to execute and test for the logon
user.
If it is the Administrator I want the script to end and not map drive.
If it is another user than I want the script to continue. Can someone
please look at this and tell me what I am doing wrong?

Thank you

@echo off

REM Welcome Screen
echo *********************************************************************
echo * Please wait as the %username% is authenticated.
echo * You are accessing the network from %COMPUTERNAME%
echo * And you are running the %OS% os.
echo * Hello %USERNAME%, welcome to the network!
echo *********************************************************************

REM Set Network Time
net time \\abc /set /yes

REM Disconnect Existing Network Drive Connections
net use * /delete /yes

REM Test For Administrator
IF "%USERNAME%" == "Administrator" GOTO END
IF "%USERNAME%" == "" GOTO Drives

REM Connect Network Drives
net use /persistent:yes

rives
net use M: \\abc\APPS
net use N: \\abc\Pub
net use x: \\abc\USERS\%UESERNAME%

:END
 
Reply With Quote
 
 
 
 
Guilmot Mike
Guest
Posts: n/a
 
      26th Apr 2004
"spikestik" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...

| REM Test For Administrator
| IF "%USERNAME%" == "Administrator" GOTO END

Aren't you supposed to rename him ? ;-)

M.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A script/batch to kill a batch file from scheduled tasks? Bogdan Windows XP Configuration 1 31st Jul 2009 06:05 AM
Re: Help with a Batch file script (FTP) Synapse Syndrome Windows Vista General Discussion 0 1st Aug 2008 02:13 AM
Can I do this with a script or batch file? Grey Windows XP General 3 27th Nov 2006 10:25 PM
batch file problem with coping logon script chaz Microsoft Windows 2000 Networking 1 13th May 2005 06:53 PM
SP2 - Logon batch script stops with security warning Dan Packard Windows XP Security 1 2nd Jul 2004 07:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:31 AM.