PDA

View Full Version : Can't modify files in Common Files folder - Windows 10 specific issue



Amarjeet
12-05-2016, 07:05 AM
Hi

I am trying to attach SQL database copied in "Program Files(x86)\common files\My Folder" and then modify them in installation process itself. User Account Control is ON

I am able to install database files in above directory. Then using custom action to attach database. While attaching database using sqlcmd it upgrades the database if it of lower version. This is standard when you try to attach SQL 2008 database to higher version.

My custom action is Differed in system context and placed before install finalise.

This works great on Window 7 but fails on Windows 10.

I am wondering why I am now allowed to attach database.

Thanks in advance.

Amarjeet

hidenori
12-05-2016, 02:33 PM
If you run the same sqlcmd command to attach your database in "Program Files(x86)\common files\My Folder" manually outside the installation, does it work?

Amarjeet
12-06-2016, 05:44 AM
Yes it works. I suspect the paths where SQLCMD is stores did not get updated for installation process. I am using powershell script to update paths.

Once installation is over and I start SEPARATE process paths are available.

Is there any way i can launch commandline in separate process ?

Amarjeet

hidenori
12-06-2016, 10:42 AM
Deferred custom actions have access to only some of the built-in Windows Installer properties. Be sure that you use the CustomActionData property to access to your property within your deferred custom action. See Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions (http://helpnet.flexerasoftware.com/installshield23helplib/installshield23helplib.htm#helplibrary/AccessingProps-DeferredCAs.htm) for more information.