1. Rick Domogalik
  2. PowerBuilder
  3. Thursday, 12 May 2022 18:12 PM UTC

I just migrated my app from 2019r3 to 2021 and after the migration and build and deploy anywhere I use FileExists or FileCopy returns a failure on execution.  

Is there something new with 2021 in regards to these functions that changed?  I have tested and deployed to multiple workstations with the same results.  It fails both in the dev environment and after a build and deploy, so not something with the dev setup.

 

Rick

 

Accepted Answer
Rick Domogalik Accepted Answer Pending Moderation
  1. Thursday, 12 May 2022 21:16 PM UTC
  2. PowerBuilder
  3. # Permalink
OK, so I just tried something that should make no difference and it corrected the issue. When we were doing our PowerServer run through, you had me set the 21 IDE to "Run as Admin". I removed that and ran normal. And bang.... everything works now. Why would running as admin cause file functions to not work? Seems a little counter productive as Admin should have elevated rights vs normal. Wonder if you can reproduce this if you so a simple file copy from one location to another using filecopy(). I was copying from a network drive to a temp folder on the local C drive. Maybe 21 doesn't like the security across the network? On a Windows Server 19 domain.
Comment
  1. Brad Mettee
  2. Saturday, 14 May 2022 14:12 PM UTC
If the Admin user isn't properly logged into those network drives that are mapped for the normal user, you'll get failures like this too.



When I pull up a CMD prompt, run as admin, a "net use" will show all the attached network drives for my normal logon as "Unavailable" until I re-attach them as admin.
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 14 May 2022 16:25 PM UTC
That's exactly how (the newer?) windows version work: from an Administrator cmd prompt you can never access any network drives.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 12 May 2022 18:40 PM UTC
  2. PowerBuilder
  3. # 1

Hi Rick;

  I use these commands all the time in my framework and demo Apps and they work just great in R3 or PB2021.

Make sure though that you are using the correct PB Runtime DLL's for each PB App EXE built from the corresponding IDE version. Since R3, the runtime DLL's are primarily the same name (no version number in the name). BTW: Did you also deploy the new <AppName>.XML file that the compiler generates along with the App EXE?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 12 May 2022 21:16 PM UTC
Hi Rick ... that would explain it as your Admin setting must have file / folder restrictions still on your PC.

Note that you only need the IDE in Admin Mode when doing PowerClient and PowerServer projects. HTH
  1. Helpful
  1. Rick Domogalik
  2. Thursday, 12 May 2022 21:24 PM UTC
This project will be a PowerClient/Server project. My account is a full system admin, both locally and on the domain. Is there another setting I need to set to allow these functions to work properly while in "admin mode"? What adverse effects will developing in non-admin mode have on the project while testing? Does being in admin mode only matter during a build/deploy or will that mess up coding if in normal?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 12 May 2022 21:34 PM UTC
I wonder if this is a Windows "Policy" issue or even maybe related to your Anti-Virus maybe? Might be worth a chat with your operations team.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 12 May 2022 18:32 PM UTC
  2. PowerBuilder
  3. # 2

Are you saying these functions fail all of the time or only in select cases? Can you provide some examples that we can verify with? What build of PB 2021 are your using? Do the files that fail share any common properties (hidden, read-only, system, etc.)?

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.