cancel
Showing results for 
Search instead for 
Did you mean: 
Amarjeet
Pilgrim

Can't modify files in Common Files folder - Windows 10 specific issue

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
Labels (1)
0 Kudos
3 Replies
hidenori
Pilgrim

Re: Can't modify files in Common Files folder - Windows 10 specific issue

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?
0 Kudos
Highlighted
Amarjeet
Pilgrim

Re: Can't modify files in Common Files folder - Windows 10 specific issue

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
0 Kudos
hidenori
Pilgrim

Re: Can't modify files in Common Files folder - Windows 10 specific issue

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 Acti... for more information.
0 Kudos