PDA

View Full Version : How do I get the logs of installation



testuser
08-25-2020, 11:54 PM
Hello,

I have created setup.exe using SB10. I have one scenario to test like, I have installed my product 1.0 which install node service using NSSM. now I want to install product 2.0, in 2.0 before copying new files I am checking if service is running then stop and then copy new files and then again start the node service using NSSM. here i want to test like if NSSM is used by other application and that time I am trying to install 2.0 how it works, so when I installed 2.0 it says installed and shows finish screen, and asks for restart, I wanted to check installation log here, so can you please help me how I can get installation log.
And as while installing 2.0 new nssm file will get copied in installation dir however old nssm file is being used by other application so how SB handles this, it does not throw any error? is it in logs?

Thanks in advance!

linder
08-26-2020, 06:16 AM
Hello,

sorry, but we really need your 1.0 and 2.0 scripts to see what you are doing here. A restart is requested (by Windows) if you replace locked (in-use) files. The un-installation log is created (by default) in the application folder (if you have enabled the uninstall feature).

You say, "old nssm file is beeing used by another application". Unfortunately, I don't know what this means. How would you handle this scenario WITHOUT SetupBuilder. You can then replicate the steps with SetupBuilder.

Friedrich

testuser
08-26-2020, 06:38 AM
Hello,

"old nssm file is beeing used by another application" means NSSM file is being locked by other application. In this case we want to show error to user and rollback if anything copied and exit the application. We want installation logs like in this case log file should show that which file is being locked which caused us to exit the installation with other logs.

Thanks!

linder
08-26-2020, 07:31 AM
Hello,

the default and recommended way is to let Windows replace the file at the next reboot.

If you would like to stop the installation, you can use the "Check In-user File..." and/or "Check In-use Folder Tree..." script functions and then act accordantly (e.g. ask the user to stop the app or kill a service and wait, then check again if it is still locked), or Exit the install.

You should do it BEFORE you begin to modify the system.

Friedrich

testuser
08-26-2020, 11:56 PM
Thanks Friedrich!!

I'll definitely check this.

testuser
08-27-2020, 07:17 AM
Hello,

can you please comment on installation logs?

Thanks!

linder
08-27-2020, 07:44 AM
Hello,

not exactly sure how to answer this question. The UNinstallation log (an ASCII text file) logs actions to power the uninstall executable (uninstall files, registry entries, edit INI, shortcuts, etc.). It does not log all actions (e.g. Run, Search for File, etc.).

You can run an installer in event logging mode (/E) to check specific actions.

Friedrich

testuser
08-31-2020, 01:10 AM
Thanks Friedrich,

I'll check that.

testuser
09-03-2020, 12:20 AM
Hi Friedrich,

Event logging will be enabled by passing \E command line option while running the installer. However If I want to always enable event logging without passing the \E, How can I do this? User will just double click on installer file and event logging should happen in that case.


Thanks in advance!!

linder
09-03-2020, 07:45 AM
Hello,

the /E event logging switch is strictly required in order to enable this feature. It's not possible to enable it by default. But I'll check if it is possible to add such a feature.

Friedrich

testuser
09-03-2020, 07:53 AM
Thanks!! please check if it is possible.

However I was trying to use /E switch but it was not generating the log file, please find the attachment for it.
Just to let you know if following things have impact on logging:
1.My application UAC level is asInvoker
2.Command prompt is not run as admin
3.I was checking txt log file at c:\
4. I have tried forward and backword slash for E

am I missing something?

5011

linder
09-03-2020, 08:25 AM
Hello,

Yes, this is the expected behavior. C:\ is a protected Windows resource. So if you create an "asInvoker" setup and run it non-elevated, then it can't write to the protected root of C:\.

Please see the following switches in the manual. This lets you define the folder:

/E2 [folder\]filename
/E3 [folder\]filename

Friedrich

testuser
09-07-2020, 03:45 AM
Yes it worked, Thanks!!