Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: NT Login winlogon
;=================cut====================== IntControl(1002,0,0,0,0) AddExtender("WWNET34I.DLL") LGHDR="Atlanta - ETC. ETC" Loginmess="" Loginmess=strcat("Logging In toATTALRPS Domain") Display(3,"%LGHDR%","%Loginmess%") td=TimeDate() date=StrSub(td,6,8) time=StrSub(td,14,9) date=StrTrim(date) time=StrTrim(time) network=netinfo(0) wsysinfo=WinSysInfo() sysname=ItemExtract(1,wsysinfo,"") proc=ItemExtract(6,wsysinfo,"") osys=WinMetrics(-4) usrfree=WinResources(2) os="" If osys == 4 os = "NT" user=RegQueryValue(@REGMACHINE, "SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\[DefaultUserName]") Else os = "95" user=RegQueryValue(@REGMACHINE, "Network\Logon\[UserName]") EndIf mem=WinResources(11)/1024 FileWrite(wtlf,"%date% %time% %user% %sysname% %opsys% %cpu% %mem%%cdrom%") FileClose(wtlf) Drop(TotalSize,DriveReport,Drives,NextDrive) NetAddDrive(@default,@default,"\\whatever\servedapps","n:",@false) NetAddDrive(@default,@default,"\\whatever2\userfiles","o:",@false) exit
Z_TEST=IntControl(1004,0,0,0,0) ; get full pathname for this exe Z_NTLOGDIR=StrCat(FilePath(Z_TEST),"..\") ; remember the pathname only if StrScan(Z_NTLOGDIR,":",2,@BACKSCAN)>0 ; if path is mapped to a drive Z_TEST=StrSub(Z_NTLOGDIR,1,2) ; get the drive letter... if WinMetrics(-4)==4 ; from Windows NT AddExtender("WWWNT32I.DLL") Z_NTLOGDIR=StrCat(wNTGetCon(Z_TEST),"\") ; ...and convert it to a UNC else if WinMetrics(-4)==5 ; or from Windows 95 AddExtender("WWW9532I.DLL") Z_NTLOGDIR=StrCat(w95GetCon(Z_TEST),"\") ; ...and convert it to a UNC endif endif endif Z_TEST=StrScan(Z_NTLOGDIR,"\",3,@FWDSCAN) ; now, scan the UNC and ... Z_NTLOGSRV=StrSub(Z_NTLOGDIR,1,Z_TEST-1) ; ...remember the server name Message("Login Server",Z_NTLOGSRV)
Article ID: W13514
Filename: NT Login Script Example.txt
File Created: 2001:04:03:15:46:26
Last Updated: 2001:04:03:15:46:26