asked on
ASKER
heres part of logon script i wrote a while ago to copy dll to client
const LogFldr="\\boss\SYSVOL\ZEUS.com.au\logs\"
dim a, src , sVers
dim fs
src="dsofile.dll"
lf = "installs.log"
sVers=""
Set oNet = CreateObject("WScript.Network")
datetime=Year(now()) & Right("0" & Month(now()), 2) & Right("0" & Day(now()), 2) & "=" & Right("0" & Hour(now()), 2) & Right("0" & Minute(now()), 2) '& Right("0" & Second(now()), 2)
Set fso = CreateObject("Scripting.FileSystemObject")
sysfld = fso.GetSpecialFolder(1) 'the system folder
winfld = fso.GetSpecialFolder(0) 'the windows folder
' write to Log
Set flf = fso.GetFile(logfldr & lf)
Set tslf = flf.OpenAsTextStream(OpenFileForAppending)
tslf.Write (Onet.ComputerName & " , " & "BEGIN" & " , " & Datetime & vbCrLf)
tslf.Write (Onet.ComputerName & " , " & "1:xx" & vbcrlf)
etc
ASKER
ASKER
VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic, but with some important differences. VBScript is commonly used for automating administrative and other tasks in Windows operating systems (by means of the Windows Script Host) and for server-side scripting in ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.
TRUSTED BY
ASKER
Why does this only work on the second login?
Dim oFS
Set objWshShell = CreateObject("WScript.Shel
Set oFS = CreateObject("Scripting.Fi
Userprofile=objWshShell.Ex
IF oFS.FileExists(Userprofile
oFS.DeleteFile (Userprofile & "\desktop\Picture Perfect 4 Client.*")
ENd IF
IF oFS.FileExists(Userprofile
oFS.DeleteFile (Userprofile & "\desktop\BACSWEB.*")
ENd IF