I have to create two conditional exes using the same nsis script. But it fails with error:
deflatetofile fwrite failed. Aborting creation process.
Can I get immediate help on this?
It seems that the internal process of file compression fails.
Do you have enough space on disk? Have you checked the rights (write access) where you are trying to create the installer?
Related
I am using NSIS to write an installer for my windows application. After installing the application, an uninst.exe is also generated in my program directory. Later on I need to uninstall my program but I failed to do that in control panel. Therefore I went to the file system and tried to delete the directory. Everything other than that uninst.exe was removed. I've tried changing permission of this file and other methods but it doesn't work.
WriteUninstaller does not set file permissions or any other attribute that might prevent you from deleting it. It sounds like the file might still be in use by something on your machine.
Things to try:
Use Task Manager or Process Explorer to see if there is a uninst.exe process still running.
Use the find handle feature in Process Explorer to find any open handles to the file.
Use Process Monitor to get detailed information about the failed delete operation.
Check %LOCALAPPDATA%\VirtualStore to make sure UAC Virtualization is not tricking you with "ghost" files.
Disable your Anti-Virus.
Reboot the machine and try to delete the file again.
Does anybody knows why there's an issue while running two builds at the
same time on the same build server?
I have the following error:
cp: cannot create regular file
`/tmp/tmpdir_ap/ck/up/config/launcher.11': Permission denied
PKG ERROR [package-prebuild.c/genfiles()] : Error 0 on system
(cp -d /vobs/tito/fdd/app/files/m2/launcher.11
/tmp/tmpdir_ap/ck/up/config/launcher.11)
On another build, I have the following error.
make[3]: Leaving directory
`/vobs/...............'
Failure in communication with signing server...........
failure getting the chain key file, aborting.
---
Unexpected error!
Two builds running in parallel are going to run into trouble if they both require exclusive access to a resource at the same time. On big projects, it may not be immediately evident that the two builds need access to the same resource because it could be the Makefile of a third party library which uses another third party library, etc.
For instance, this error message:
`/tmp/tmpdir_ap/ck/up/config/launcher.11': Permission denied
suggest that the build uses a temporary directory located in /tmp/ but whose name is not generated to prevent clashes. So if you have two folks running a build which uses that temporary directory, you're going to run into problems.
I don't know what is causing your network error but again if it is a matter of exclusive access (e.g. if the build process starts a server on a fixed port), then that could explain why the build fails.
The solution to this kind of conflict is to go through the build process to ensure that temporary directories are created to have unique names, ports can be assigned dynamically to avoid conflicts, etc.
I am receiving the below error when I'm trying to build the solution file from MSBUILD.
I'm building the solution file from ClearCase integration stream .
When I do the same from a different system it works fine on the integration stream.
I have tried creating and writing the file into the N/W drive & it works fine.
But when I build it through CruiseControl it is throwing the following error.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(3041,9):
error MSB3491:
Could not write lines to file "obj\DAL.csproj.FileListAbsolute.txt".
Access to the path 'M:\yj73_SRDV3G_Proj_01_00_int\SRM_COMP\SRDV3G_Project\CRDB_V3\Application_Source\DAL\obj\DAL.csproj.FileListAbsolute.txt' is denied.
Two usual causes:
The CLEARCASE_PRIMARY_GROUP environment variable is incorrectly set and don't reference the primary or secondary group of the Vob \SRM_COMP (see cleartool descr -l vob:\SRM_COMP for a list of those groups)
The path is somehow not selected by the current config spec.
It is best to do a cleartool ls in M:\yj73_SRDV3G_Proj_01_00_int\SRM_COMP\SRDV3G_Project\CRDB_V3\Application_Source\DAL to see how ClearCase displays obj.
The OP user1383839 confirms not using the right account for the Build Loop, which means it didn't benefit from the right environment variable, hence the "access denied" message.
Or you can also "runas" the project as a different user (see "Running cruise control.net under different credentials")
This issue got Fixed !:)
I was using the local account Previous
you need to go to the properties of the cruise control and change the account it is being used.
I have a setup that is installing a PDF program. It works perfectly on test machines. When there is other PDF software on the machine, errors pop up because of the large number of shared files that are inuse.
Inno has the /SUPPRESSMSGBOXES option. However I can not seem to configure this to ignore the file copy - it either wants to Abort or Retry. Abort - the setup will fail. Retry - will never succeed because the file is in use.
Does anyone know how to automatically ignore any copy file errors while setting up?
You can use the restartreplace flag for the files that may be in use, it is exactly to suppress those error dialogs.
To quote the documentation of the [Files] section:
restartreplace
When an existing file needs to be replaced, and it is in use (locked) by another running process, Setup will by default display an error message. This flag tells Setup to instead register the file to be replaced the next time the system is restarted (by calling MoveFileEx or by creating an entry in WININIT.INI). When this happens, the user will be prompted to restart their computer at the end of the installation process.
I want to delete a folder which contains the currently running application. How can i do it..? is there any way of doing it ? i.e the folder which contains the application should delete after the application has finished running ?
Your best bet is probably to use the Win32 API MoveFileEx. It has a flag that can be set for deleting files when they are in use on the next reboot called MOVEFILE_DELAY_UNTIL_REBOOT. Set the new filename parameter of MoveFileEx to NULL to perform this type of delete.
If dwFlags specifies
MOVEFILE_DELAY_UNTIL_REBOOT and
lpNewFileName is NULL, MoveFileEx
registers the lpExistingFileName file
to be deleted when the system
restarts.
Note: Normal files that are in use can be deleted normally using the Win32 API DeleteFile depending on if they were opened (Using the Win32 API CreateFile) with FILE_SHARE_DELETE permission. I don't think running programs by default on Windows have that permission though. When a file is specified to be deleted that is in use but that was opened with this flag, then the file will be removed when the last file handle is closed.
This is hairy. I had to implement this once for a self-patching app, where the patcher had to (by client request) delete itself after installing the patch. You can do this by launching a helper DLL which deletes your process, along with itself.
The full method for deleting your process can be found here: http://www.handcraftedbytes.com/articles/writing-install-and-uninstall
As others have pointed out, you're not going to be able to delete the folder that your executable resides in while it exists there. My suggestion is to:
Use MoveFileEx to move your executable off to a temporary directory,
delete your application's directory,
delete your executable using the self-deleting DLL method described in the link above.
You cannot delete an executable file that is currently running, however you can delete a batch file that is currently running (cmd.exe loads the whole file into memory and then you can delete it).
So the simplest solution would be to launch a batch that tries to delete the .exe in a loop (because it may not work the first time - until your .exe has been unloaded) and then exit your process - with the batch file still running.