Hide username and password in log file - Advanced Installer Community
413X
Posts: 11
Joined: Wed Jun 13, 2018 9:46 am

Hide username and password in log file

I am installing silently using a command line script which looks along the lines of:

Code: Select all

"C:\Users\theUser\Desktop\application.exe" /exenoui /quiet /norestart /l*v "C:\Users\theUser\Desktop\Install.log" VARIOUS_VARIABLES="WITHTHEIRVALUES" APPLICATION_USERNAME="UN" APPLICATION_PASSWORD="PW"
I do not wish the sensitive information to be leaked in the log file. There are multiple threads surrounding this subject and yet it is incredibly unclear what has to be done to resolve this issue. In my current project, the UN/PW is leaked a lot. One big source is various Custom Actions but also EXE_CMD_LINE.

I have:
1. In Install parameters-> Properties: Set "Hide Property" of property APPLICATION_USERNAME and APPLICATION_PASSWORD.

2. In Table Editor -> CustomAction -> I added 8192 onto the Type value. So, 51 becomes 8243.

3. In Custom Actions -> Set installer Property -> placed it in the very beginning -> Property name: MsiHiddenProperties Value: [APPLICATION_USERNAME];[APPLICATION_PASSWORD];

4. Added a property with the same name as a Custom Action that reveals the UN/PW with the "Hide Property" flag.

Regardless of the amount of values I hide or add 8192 to. The log keeps printing out the variables every single time and in every single instance of it. Could i get a step by step explaination in how to remove the sensitive information and to be sure they are gone from the log file because it is not working for me.

edit1: Added point 4 and some clarifications.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Hide username and password in log file

Hello and welcome to our forums,

Indeed, when using an EXE setup package the installer properties you set from command line will be set in the "EXE_CMD_LINE" property and revealed in the log file as long as you do not also set the "EXE_CMD_LINE" property as hidden.

So, to avoid this behavior, please proceed like this:

1. go to "Install Parameters" page and create a new property like this:
  • Name: EXE_CMD_LINE
    Value: Your value
    Hide property: checked
2. rebuild and test again the setup project.

Also, please keep in mind that if at install time the current machine Debug policy is set to a value of 7, then the installer will write the property in the log, even if the property is marked as hidden.

Let us know if this helped, otherwise please send us your AIp (setup project file) by email to support at advancedinstaller dot com so we can investigate and test its settings.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
413X
Posts: 11
Joined: Wed Jun 13, 2018 9:46 am

Re: Hide username and password in log file

Edit: Removed my followup question.

Adding the property CustomActionData with the hide property helped remove all the customactions.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Hide username and password in log file

Hello,

Thank you for your follow up on this.

I'm glad you got this working.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”