We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jaypatel011
Posts: 4
Joined: Thu Dec 22, 2016 10:11 pm

how to run sql script under specific sql account on uninstall

I am evaluating your product and I am running into issue where I am able to run SQL script on installation based on user provided sql credentials. However when I uninstall product, Sql Script to remove database runs under current login user. How Can I make Uninstallation script run under specific user account.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: how to run sql script under specific sql account on uninstall

Hello and welcome to our forums,

To achieve this you can handle the SQL accounts through installer properties. For instance, you can have two installer properties (SQL_USER and SQL_PWD) which are set on install/uninstall with the desired SQL account values. Then, you can go to "SQL Databases" page andconfigure your SQL connection to use formatted references of those properties in the username and password fields.

If you have any questions or doubts just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jaypatel011
Posts: 4
Joined: Thu Dec 22, 2016 10:11 pm

Re: how to run sql script under specific sql account on uninstall

I am doing same, It works for installation but it doesn't work for uninstallation. Can you make quick sample and attach here for reference. Thanks.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to run sql script under specific sql account on uninstall

Hello,

For this, you can set the related properties as persistent properties in the Install Parameters page.

Please let me know if you have any questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jaypatel011
Posts: 4
Joined: Thu Dec 22, 2016 10:11 pm

That worked Thanks!
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: how to run sql script under specific sql account on uninstall

You're welcome,

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”