moshem
7th May 2001, 21:26
Hi
I am new to NSIS ,
when trying to register a dll I get "Error opening file for writing" , the file is not open at that time by any application.
I went to check it using sysinternals filemon , and saw that while NSIS tried to copy the file , the file system reported a "Sharing violation" .
I made another installation using the InstallWizard system , and run it while watching at FileMon , no sharing violation happend . I immediatly run NSIS based installation and got the problem again.
this is my code snippet , please tell me how to make NSIS get over the sharing violation (and any other comments you have regarding my use of NSIS)
thanks
Section "Test1"
; Set output path to the installation directory.
SetOutPath $SYSDIR
ClearErrors
IfErrors 0 GoError
CompareDLLVersions /STOREFROM "c:\winnt\system32\l3codecx.ax" "$SYSDIR\l3codecx.ax" docopy none
DetailPrint "Files are the same"
goto none
docopy:
; Put file there
File "c:\winnt\system32\l3codecx.ax"
REGDLL "$SYSDIR\l3codecx.ax"
DetailPrint "Installing.."
goto end
GoError:
DetailPrint "Error.."
none:
DetailPrint "Skip.."
end:
SectionEnd ; end the sectionSectionEnd
I am new to NSIS ,
when trying to register a dll I get "Error opening file for writing" , the file is not open at that time by any application.
I went to check it using sysinternals filemon , and saw that while NSIS tried to copy the file , the file system reported a "Sharing violation" .
I made another installation using the InstallWizard system , and run it while watching at FileMon , no sharing violation happend . I immediatly run NSIS based installation and got the problem again.
this is my code snippet , please tell me how to make NSIS get over the sharing violation (and any other comments you have regarding my use of NSIS)
thanks
Section "Test1"
; Set output path to the installation directory.
SetOutPath $SYSDIR
ClearErrors
IfErrors 0 GoError
CompareDLLVersions /STOREFROM "c:\winnt\system32\l3codecx.ax" "$SYSDIR\l3codecx.ax" docopy none
DetailPrint "Files are the same"
goto none
docopy:
; Put file there
File "c:\winnt\system32\l3codecx.ax"
REGDLL "$SYSDIR\l3codecx.ax"
DetailPrint "Installing.."
goto end
GoError:
DetailPrint "Error.."
none:
DetailPrint "Skip.."
end:
SectionEnd ; end the sectionSectionEnd