IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New solution
the NUL was a good idea, but didn't work(I tried both > and <). I discovered that NET TIME would fail if id/password were incorrect, so I'm using that for validation:

@echo off
rem this script confirms the user entered valid id/password
rem if invalid, it restarts windows
rem else it maps the required network drives

rem set time, if it fails then userid/password is invalid
net time \\\\server /set /yes
if errorlevel 1 goto LogOff

rem clear any existing drive mappings
net use * /delete /y

rem map label drives
net use K: \\\\server\\apps /yes
net use O: \\\\server\\labels /yes

rem test that drives mapped OK
if not exist K: goto LogOff
if not exist O: goto LogOff
exit

:Logoff
echo "Password was wrong, restarting Windows"
rundll32.exe shell32.dll,SHExitWindowsEx 6


I also had to change the last parameter in the rundll32 line from 4 to 6. 4 does a logoff while 6 does a reboot. Logoff seems like it would make more sense, but it wasn't doing a true logoff. The logon prompt would show up, but the rest of the desktop remained and the user could cancel it w/out the script running again.

I'm off to San Antonio(had a busy half day) so I'll see y'all next week.
Darrell Spice, Jr.                      [link|http://www.spiceware.org/cgi-bin/spa.pl?album=./Artistic%20Overpass|Artistic Overpass]\n[link|http://www.spiceware.org/|SpiceWare] - We don't do Windows, it's too much of a chore
New One question...
Where are you executing this script? I may want to try something like this also.
[link|mailto:jbrabeck@attbi.com|Joe]
New startup folder
start->programs->startup
Darrell Spice, Jr.                      [link|http://www.spiceware.org/cgi-bin/spa.pl?album=./Artistic%20Overpass|Artistic Overpass]\n[link|http://www.spiceware.org/|SpiceWare] - We don't do Windows, it's too much of a chore
New Thanks
[link|mailto:jbrabeck@attbi.com|Joe]
     98 login script - (SpiceWare) - (9)
         Don't have a 98 machine here at work, so from top of head... - (jbrabeck)
         Re: 98 login script - (deSitter) - (1)
             thanx - (SpiceWare)
         little closer - (SpiceWare) - (1)
             "net use K: \\\\server\\apps > NUL" ? -NT - (CRConrad)
         solution - (SpiceWare) - (3)
             One question... - (jbrabeck) - (2)
                 startup folder - (SpiceWare) - (1)
                     Thanks -NT - (jbrabeck)

Powered by cottonseed hulls, oat hulls, Jerusalem artichokes, fruit pits, soy beans, bagasse, straw and wood pulp!
39 ms