Question Locked

vbscript error on one of client pc during logon

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I keep getting this error on one of my client pc's have tried to re-image the clent to no avail, don't know what to do to correct this problem, any advice would be greatly,Appreciated

6 replies

by retro77

Can you post the error and what the client PC is doing when the error appears. Also list what software is installed. What OS are you running? Is it up to date with patches and service packs?

by presleyd2007

script:
\\DSCA.Local\sysVol\DSCA.Local\Policies\{A6164733-56A4-4DD0-8938-FCC6EC619F0C}\user\scripts\Logon\class_files.vbs
Line: 18
Char: 2
Error:Files already exists
Code: 800A003A
Source: Microsoft VBscript runtime error,

All tablet pc's have the same software loaded, just the normal stuff, ie ms office, windows xp tablet edition, IE7 cac reader and Norton Av, everything is up to date as far as i can tell, just that this one tablet is getting the error, they were all clone from the same image.

by dan.cox

Please provide more of your script so we can see exactly what you are trying to do.

by presleyd2007

this script update any changed files when a student logon/off during class, it also set-up network shares, ie printers and shared drives, and creates a class files folder on the desktop.

' Function to map a network drive
sub mapDrive( sDrive, sPath, sName )
On Error Resume Next
objNetwork.RemoveNetworkDrive sDrive

objNetwork.MapNetworkDrive sDrive, sPath
objShell.NameSpace(sDrive).Self.Name = sName
end sub

' Get username of student loging in
Set objNetwork = CreateObject("WScript.Network")
username = objNetwork.UserName

' Create folder
classfolder = "c:\Documents and Settings\" & username & "\Desktop\Class Files"
Set fso = CreateObject("Scripting.FileSystemObject")
if NOT fso.FolderExists(classfolder) then
fso.CreateFolder(classfolder)
end if

' Map network drive
mapDrive "z:", "\\dsca-dc\classfiles", "Class Files"

' Update class files folder
set wshell = CreateObject("WScript.Shell")
wshell.run "xcopy z:\instructors\* """ & classfolder & "\"" /D /E /C /R /Y

by dan.cox

Try this....

' Create folder
classfolder = "c:\Documents and Settings\" & username & "\Desktop\Class Files"
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(classfolder) then
Else
fso.CreateFolder(classfolder)
end if

' Map network drive
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.MapNetworkDrive "Z:", "\\dsca-dc\classfiles", "Class Files"

This discussion is closed to new replies.