View Single Post
Old 16th December 2013, 15:07   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
This works fine in 2.46:
Quote:
Section

!define longname "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 9abcde" ; Path elements are length limited to 255 even with \\? (GetVolumeInformation lpMaximumComponentLength)

System::Call 'kernel32::CreateDirectoryW(w "\\?\$temp\${longname}", i0)i.r0?e'
Pop $1
DetailPrint $0,gle=$1
System::Call 'kernel32::CopyFileW(w "$exepath", w "\\?\$temp\${longname}\${longname}", i 0)i.r0'?e'
Pop $1
DetailPrint $0,gle=$1

System::Call 'kernel32::DeleteFileW(w "\\?\$temp\${longname}\${longname}")i.r0?e'
Pop $1
DetailPrint $0,gle=$1
System::Call 'kernel32::RemoveDirectoryW(w "\\?\$temp\${longname}", i0)i.r0?e'
Pop $1
DetailPrint $0,gle=$1

SectionEnd

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote