janneman Posted January 16, 2009 Share Posted January 16, 2009 The code below (compiled with V3.3) runs fine under WinXP, Vista and WinPE 2005. But not under WinPE 2.1 (i.e. Vista SP1 based WinPE). The DirCopy command fails. When I replace the UNC path with a drive letter, it works again. As you can see from all the testing in the code, trivial explanations have been ruled out. The paths involved exist. Can't be permissions because it works with a drive letter. The UNC path is valid because by the time the DirCopy fails, several other dir & file functions have successfully used the same UNC path, including FileExists, FileGetAttrib and FileCopy. Any idea what might be going on here? Or how to debug the situation? Or what I may need to add the WinPE? I've already tried filemon (hoping it would show a DLL not being found), but no luck... Thanks for any thoughts... CODE$src = "\\core88a\provisioning\intelsata" ;$src = "z:\intelsata" $dest = "c:\drivers" If Not IsFolder($src) Then ErrorExit("Source folder not found: " & $src, 7) DirCreate($dest) If Not IsFolder($dest) Then ErrorExit("Unable to create target folder: " & $dest, 8) If Not FileCopy($src & "\*.*", "c:\test1", 9) Then ; 8 = create dirs, 1 = overwrite ErrorExit("FileCopy failed" , 9) EndIf If Not DirCopy($src, $dest, 1) Then ; 1 = overwrite ErrorExit("DirCopy Failed", 10) EndIf Func ErrorExit($msg, $exitcode) MsgBox(0x40010, "CopyTest", $msg, 10) Exit $exitcode EndFunc ; Return true if $s is a folder Func IsFolder($s) If Not FileExists($s) Or Not StringInStr(FileGetAttrib($s), "D") Then Return False Return True EndFunc Link to comment Share on other sites More sharing options...
IcemanND Posted April 28, 2009 Share Posted April 28, 2009 Anyone having any luck with this? Having the same issue here. Link to comment Share on other sites More sharing options...
lxxl Posted October 24, 2009 Share Posted October 24, 2009 (edited) same issue here so i just use xcopy RunWait('xcopy' & " /E /S /Y " & $var3 & " " & $var4 & " ", "x:\", @SW_SHOW) Edited October 24, 2009 by lxxl Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now