Hello All,
I have done a script to create and then copy from network share, it also copies two files to the windows dir and one Icon to profile.
The problem is that the script works when I run it from pc but not when I create a Logonscript in AD with GPO. I get all sorts of funnies, like path not found, end of statement. What do I need to do to make it work?
Thanks
John1944
'DEFINE VARIABLES & INITIAL POINTERS
sSourceFile = "h:\rips2006\*.*"
sSourceFile1 = "c:\rips2006\ans.i*"
sSourceFile2 = "c:\rips2006\sql.i*"
sSourceFile3 = "c:\rips2006\rips 2006.l*"
sDestinationFile = "c:\RIPS2006"
sDestinationFile1 = "c:\windows"
sDestinationFile2 = "C:\Documents and Settings\All Users\Desktop"
Set oFSO = CreateObject("Scripting.FileSystemObject")
'CHECK DESTINATION ROOT EXISTS AND IF NOT CREATE IT
if NOT oFSO.FolderExists(sDestinationFile) THEN
oFSO.CreateFolder(sDestinationFile)
'COPY FILES
oFSO.CopyFile sSourceFile, sDestinationFile
oFSO.CopyFile sSourceFile1, sDestinationFile1
oFSO.CopyFile sSourceFile2, sDestinationFile1
oFSO.CopyFile sSourceFile3, sDestinationFile2
End If
'CLOSE OFF OBJECTS
Set oFSO = NOTHING
I have done a script to create and then copy from network share, it also copies two files to the windows dir and one Icon to profile.
The problem is that the script works when I run it from pc but not when I create a Logonscript in AD with GPO. I get all sorts of funnies, like path not found, end of statement. What do I need to do to make it work?
Thanks
John1944
'DEFINE VARIABLES & INITIAL POINTERS
sSourceFile = "h:\rips2006\*.*"
sSourceFile1 = "c:\rips2006\ans.i*"
sSourceFile2 = "c:\rips2006\sql.i*"
sSourceFile3 = "c:\rips2006\rips 2006.l*"
sDestinationFile = "c:\RIPS2006"
sDestinationFile1 = "c:\windows"
sDestinationFile2 = "C:\Documents and Settings\All Users\Desktop"
Set oFSO = CreateObject("Scripting.FileSystemObject")
'CHECK DESTINATION ROOT EXISTS AND IF NOT CREATE IT
if NOT oFSO.FolderExists(sDestinationFile) THEN
oFSO.CreateFolder(sDestinationFile)
'COPY FILES
oFSO.CopyFile sSourceFile, sDestinationFile
oFSO.CopyFile sSourceFile1, sDestinationFile1
oFSO.CopyFile sSourceFile2, sDestinationFile1
oFSO.CopyFile sSourceFile3, sDestinationFile2
End If
'CLOSE OFF OBJECTS
Set oFSO = NOTHING