Page 1 of 1 1
Topic Options
#68473 - 2002-07-18 08:20 PM OK, if I wrap a twenty around a floppy
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
can you tell me where I am being stupid ... seems to run ... but no majik ...
Cobbled together from various scripts, my compliments to all I stole from ... the list is far too large to put here ((grin))

code:
 ;************************************************************
;** Script: Login Splash Screen
;** Version: 2.1
;** Created: July 04, 2002 - 09:14 PM
;**
;** Purpose / Comments:
;**
;** Show the User something nice while they are waiting
;**
;** Original splash screen code - Ruud van Velsen
;**
;************************************************************

;************************************************************
;** Script Debuging

;** On the command line define "$DEBUG=1" to get a
;** more detailed output. (Without quotes)
;**

;************************************************************
;** Common defines
;**

$TRUE = 1
$FALSE = 0

;************************************************************
;** Globals
;**

; Your institutions name goes here
$Title = "NEA & SA Bureau Unclassified System"

;************************************************************
;** Script Start
;**

; Turn break on

Break On

; Start of Script
:MAIN

; Signal start of script
If $DEBUG = $TRUE
"*** Start of Script ***" ? ?
EndIf

; Set output to ASCII
Dim $PreviousASCIIState
$PreviousASCIIState = SetASCII ("ON")

; Clear the screen
Cls

; Show the splash screen
Gosub SPLASH_SCREEN

; Progress meter init
; NOTE: A Full bar is 34
$Progress = 0
$AjustProgress = 0

;
; Setting Network Time
;
SetTime "\\NEASASNTSA"
sleep 2
IF EXIST "%systemroot%\formdata" goto FF21
else
MD "%systemroot%\formdata"
:FF21
ENDIF

;Clear network drives
Use * /delete

;
; Do network drives
;
; Use F: @HOMESHR
;***:GROUP_CONFIGURATIONS
If InGroup("Domain Admins")
Use f: "\\neasasntsa\f\NeaEX\DSD\@userid" /persistent
if @error = 0 goto filesok
AT (15,25) "ERROR: Network drive unavailable"
sleep 20
shell "cmd /C net send %computername% NETLOGON ERROR: network drive is down. Call NetAdmin at 7-1745 > NUL"
shell "cmd /C net send neasaexdsd10 net files at %computername% is down, shit is happening. > nul"

goto files
:filesok
; Awesome, your home directory is mapped ...
Color G+/n
AT (15,25) "Server folders mapped"
sleep 5
:files
EndIf
EndIf

sleep 2
Use I: "\\NEASASNTSA\FF21" /persistent
AT (15,25) ""I" Drive mapped"
Sleep 1
; Update progress bar
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Use G: "\\AXIS256158\Guides" /persistent
AT (15,25) ""G" Drive mapped"
sleep 1
; Update progress bar
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Use P: "\\AXIS256158\policy" /persistent
AT (15,25) ""P" Drive mapped"
sleep 1
; Update progress bar
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Use R: "\\AXIS256158\Regs" /persistent
AT (15,25) ""R" Drive mapped"
sleep 1
; Update progress bar
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Use L: "\\AXIS256158\learn" /persistent
AT (15,25) ""L" Drive mapped"
Sleep 1
; Update progress bar
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Use M: "\\AXIS256158\EFORMS" /persistent
AT (15,25) ""M" Drive mapped"
Sleep 1
; Update progress bar
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Use Z: "\\NEASASNTSB\Archive\@UserID" /persistent
AT (15,25) ""Archive" Drive mapped"
Sleep 1
; Update progress bar
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1

;
; Seperate Kix scripts
;
Call "\\neasasntsa\c$\kixscpt\background.kix"
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Call "\\neasasntsa\c$\kixscpt\srvcomnt.kix"
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
Call "\\neasasntsa\c$\kixscpt\bck.kix"
$AjustProgress = 1 ; add 1 more blocks
Gosub DRAW_PROGRESS
sleep 1
run "\\neasasntsa\c$\securitybar\sbu_bar.exe"
sleep 1

; Microsoft Systems Management Server (start)
; SMS Build 1493
Shell '%comspec% /e:1024 /c smsls.bat'
; Microsoft Systems Management Server (end)

; Update progress bar
$AjustProgress = 14 ; were done
Gosub DRAW_PROGRESS

; Popup Password age
If InGroup("Domain Users") And @DAY = 1 Call "\\neasasntsa\c$\kixscpt\pwdage.scr"
EndIf


; ********************************************************

; Reset the output mode
$X = SetASCII ($PreviousASCIIState)

; Clear the screen again
Cls

; Signal end of script
If $DEBUG = $TRUE

? ? "*** End of Script ***"

; EndIf

Exit ; Quit

;************************************************************
;** Script Subroutines ( GOSUBs )
;**

; Draw screen information
:SPLASH_SCREEN

; Background grid
Color n/N
Box (0, 0, 24, 79, Grid)

; Title banner
Color G/N
Box (3, 3, 5, Len ($Title + 8) + 5, ) ; shadow
Color G+/N
Box (2, 2, 4, Len ($Title + 8) + 4, FULL) ; box

; Information box
Color G/N
Box (8, 21, 18, 61, ) ; shadow
Color G+/N
Box (7, 20, 17, 60, FULL) ; box

; Draw the progress bar
Color G/N
Box (20, 21, 22, 61, ) ; shadow
Color G+/N
Box (19, 20, 21, 60, FULL) ; box

; Center the title on the screen
Color Y+/N
At ( 3, 4) $Title

; Display some text strings
Color W+/N

if ((@time > "00:00:00") and (@time < "12:00:00"))
at (8, 25) "Good Morning, "+@fullname
else
if ((@time >= "12:00:00") and (@time < "18:00:00"))
at (8, 25) "Good Afternoon, "+@fullname
ELSE
at (8, 25) "Good Evening, "+@fullname
endif
endif

At (11, 25) "Privilege : "
At (12, 25) "Workstation : "
At (13, 25) "Domain : "
At (14, 25) "Logon Server : "

; ...and some macro's
Color Y+/N

At (11, 40) @PRIV
At (12, 40) @WKSTA
At (13, 40) @DOMAIN
At (14, 40) @LSERVER

Return

; Draw progress bar
:DRAW_PROGRESS

; Setup progress bar ajustment
$AjustProgress = $Progress + $AjustProgress

; Bump progress up
While $Progress <= $AjustProgress

; Diplay curent progress
Color R+/N
At (20, 22 + $Progress) Chr (219)
$Progress = $Progress + 1

Loop

Return



[ 18 July 2002, 20:23: Message edited by: Beelzel ]
_________________________
If not for the last minute ... nothing would get done ...

Top
#68474 - 2002-07-18 08:28 PM Re: OK, if I wrap a twenty around a floppy
JensKalski Offline
Starting to like KiXtart

Registered: 2000-12-13
Posts: 186
Loc: Germany
It seems that your script sleeps a lot [Wink]
but where is your problem?
_________________________
Jens Kalski

Top
#68475 - 2002-07-18 08:49 PM Re: OK, if I wrap a twenty around a floppy
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
also, using net send, it may be turned of as it's a service.

what calls the progress bar?
is it coming from the called scripts or?

[ 18 July 2002, 20:50: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#68476 - 2002-07-18 09:02 PM Re: OK, if I wrap a twenty around a floppy
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
Yeah, sleeps a lot ... like me on the job ...

IF not sleep ... it flashjes by in a matter of nano's ... but no drive mappings et al
_________________________
If not for the last minute ... nothing would get done ...

Top
#68477 - 2002-07-18 09:09 PM Re: OK, if I wrap a twenty around a floppy
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
yeah. but the code:
code:
if @error = 0 goto filesok
AT (15,25) "ERROR: Network drive unavailable"
sleep 20
shell "cmd /C net send %computername% NETLOGON ERROR: network drive is down. Call NetAdmin at 7-1745 > NUL"
shell "cmd /C net send neasaexdsd10 net files at %computername% is down, shit is happening. > nul"

goto files

the 20 second sleep does no good for anything. all it does is fully stop the execution.
_________________________
!

download KiXnet

Top
#68478 - 2002-07-18 09:12 PM Re: OK, if I wrap a twenty around a floppy
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Hmm, something lke this line
code:
Call "\\neasasntsa\c$\kixscpt\srvcomnt.kix"

will only work for users who ahve local administrative provileges to \\neasasntsa.

SETTIME will also only work for users who have 'Change Time' permissions (by default only Power Users and Administrators)

'Use Z: "\\NEASASNTSB\Archive\@UserID' will not work at all for Windows 9x/NT. For Windows NT, you will have to use SUBST. See the 'Map Root' part in the KiXtart documentation.

This is what I found taking just a quicklook, which suggests that there are other issues, too. please use
code:
? ''+@ERROR+' - '+@SERROR

to display error messages e.g. after each USE command. It'll make it easier to trakc down problems.

I would also recommend moving all your .KIX files into one single login script.
_________________________
There are two types of vessels, submarines and targets.

Top
#68479 - 2002-07-18 10:02 PM Re: OK, if I wrap a twenty around a floppy
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
as always ... thanks ... will hammer again this weekend, it is gong to rain anyway ...

on-on
_________________________
If not for the last minute ... nothing would get done ...

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 294 anonymous users online.
Newest Members
MacduMela, karimKix, NicoK, Kelly001, MichaelK72
17776 Registered Users

Generated in 0.053 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org