PDA

View Full Version : Deleting a file after installation...



ferguslogic
06-08-2009, 10:08 AM
Hello lindersoft team,

I am using a batch file to install sql express 05 with command line parameters as well as some smo setups for our application.

I would like to delete this batch file after the installation completes but I am not able to do so.

When I attempt to delete the file I do not receive any errors at all, the file is just never removed.

Here is the code that I am using toward the end of our script


Register all pending file operations

Display Message Box "%_SB_INSTALLDIR%\05ExpressInstall.bat" -- "file path"

#delete file "%_SB_INSTALLDIR%\05ExpressInstall.bat"



You will notice I am displaying a message box just to verify the path is correct and it definitely appears to be. So I am not sure what the issue may be.

I am running 6.9.2587

thank you

Matt

linder
06-08-2009, 10:33 AM
Matt,

The following is a COMPILER directive (executed at compile-time, not installer run-time)

#delete file "%_SB_INSTALLDIR%\05ExpressInstall.bat"

You have to use the "Delete File(s)..." installer function to delete a file at installer runtime.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

ferguslogic
06-09-2009, 08:36 AM
Yes sir..makes sense...will try it out.

Thank you.