GP SoftwareTwitter
Opus FAQsManualCommandsObjects

How does DO copy these files and how-to do with Powershell?

In the company we have a normal user (no admin rights) and an own admin-user (local).

With DO I've copied a file from a network share to a sub dir of "C:\Program Files". I've been asked for my local admin user + password and the file was copied. :grinning:

Other users tried to copy them too (no DO) - but failed with Explorer or Powershell (me too). :sweat_smile:

With normal user - no pop-up for admin user happens (is this possible disabled in our company?).

With Explorer - it looks like it reads from the network share, admin pop up - enter user - but then refuses to write the file that I need admin rights .. ?

PS Microsoft.PowerShell.Core\FileSystem::\\xxx\0188\groups\DBMS\DB2\Software\JDBC Treiber\JDBC_SQLJ_v11.5> copy .\db2jcc4.jar "C:\Program Files\IBM\SDPShared\plugins\com.ibm.datatools.db2_2.2.201.v20170814_2141"
copy : Access to the path 'C:\Program Files\IBM\SDPShared\plugins\com.ibm.datatools.db2_2.2.201.v20170814_2141\db2jcc4.jar' is denied.
At line:1 char:1
+ copy .\db2jcc4.jar "C:\Program Files\IBM\SDPShared\plugins\com.ibm.da ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (\\xxx....1.5\db2jcc4.jar:FileInfo) [Copy-Item], UnauthorizedAccessException
    + FullyQualifiedErrorId : CopyFileInfoItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.CopyItemCommand

Problem one is that the local admin user doesn't have access to the network share and problem two the normal user doesn't have write access to "C:\Program Files".

The only workaround would be to copy the files from network share to our local data dir "C:\Data" and then with local admin user from "C:\Data" to "C:\Program Files".

  1. But how to copy these files without DO without workaround - in one step?
  2. How does DO copy these files (read with normal user, write with local admin user?)

Thanks!

Opus just uses UAC if it needs to for the write side. Nothing magic.

I'm surprised if Explorer doesn't do the same.

I don't know how PowerShell and UAC work together.