1. Ramesh Govindarajan
  2. PowerBuilder
  3. Wednesday, 27 January 2021 17:09 PM UTC

Hi,

      We have a very old power builder code and its running fine in production (  windows 2008 and SQL 2008 )

      Currently when a user logins , the "profilestring" in the code  Trim(ProfileString("C:\windows\choice.ini", "Choice", "drive", "") , default its  looking for the choice.ini file in user profile folder . In my case its looking at c:\users\ramesh\windows\choice.ini.  If it doesn't find it in my user profile then only its going to c:\windows\choice.ini . This is working fine now in production version.

       As a part of server upgrade task ,  I  compiled the  the code in Appeon 2019 R2 and placed all the necessary the files in the new server ( windows 2016 ) now the profilestring is not looking in the user profile folder , instead its going to C:\windows.  Anything changed in profilestring functionality ?  How to fix this. I want profilestring to look in the user profile folder first because every user has different connection strings. Your response is greatly appreciated.

 

Thanks

 

Ramesh G

 

Additional Info :

     I tested this in my local machine. Profilestring is looking in the following folder first  C:\Users\rgovinda\AppData\Local\VirtualStore\Windows.  If it doesn't find then checking in c:\windows. So after upgrade profilestring functionality is sort of working in my laptop( windows 10 ). I compiled the same code and put in server ( windows 2016 ) and it doesn't work . Something is missing . Need advice.

 

Thanks again.

     

     

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 17:48 PM UTC
  2. PowerBuilder
  3. # 1

Hi Ramesh;

   What PB version & build are you currently using?

   FWIW: There should be no changes to the ProFileString() method unless you are moving from a PB version <10 to a PB version >10. That is when PB went from being ANSI based to being Unicode based.

   Also note that PB2019 R2 does not support the W2008 Rx O/S any more.

http://docs.appeon.com/pb2019r2/installation_guide_for_pb/ch01s01.html

Regards ... Chris

Comment
There are no comments made yet.
Ramesh Govindarajan Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 17:59 PM UTC
  2. PowerBuilder
  3. # 2

Chris.

  Thanks for your response. I am sure this code is from older version of the PB. Only we have the source code. I upgraded to 2019 R2.  Did you see my updated message ? its working in my laptop not in the server.  ( windows 2016 ). 

Appreciate your help.

 

Thanks

 

Ramesh G

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 27 January 2021 20:12 PM UTC
Hi Ramesh;

Yes, I did. I added the R2 & W2008 in my reply as a note to people still using W2008.

For the "Server" deployment, please make sure that you carefully read the PB2019 R2 Help. In particular, search for the keyword "runtime" and then follow the "PowerBuilder runtime files" link to an area that describes in detail all the files that you need to deploy with your PB App EXE. The file list has changed considerably in the Appeon editions of PB. HTH

Regards ... Chris
  1. Helpful
  1. Ramesh Govindarajan
  2. Wednesday, 27 January 2021 20:37 PM UTC
Thanks Chris. I will dig in some more. Really appreciate your response.
  1. Helpful
There are no comments made yet.
Ramesh Govindarajan Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 18:03 PM UTC
  2. PowerBuilder
  3. # 3

Appeon PB standard Edition
Version 2019 Build 2353

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 19:11 PM UTC
  2. PowerBuilder
  3. # 4

"running fine in production (  windows 2008 and SQL 2008 )"

"new server ( windows 2016 )" 

 

it is probably changes in windows server.  microsoft has been securing windows (especially server) to prevent applications writing to files in windows directory, programfiles directory, etc.

Comment
  1. Ramesh Govindarajan
  2. Wednesday, 27 January 2021 19:21 PM UTC
0

Votes

Thanks Mike for your response.



Production ( windows 2008 )



Code : OLD Code - accessing user profile folder is working. ( It has remote desktop services RDS installed )



Development ( windows 2016 )



Code : OLD Code ( copied from Prod) - Accessing user profile folder is working. ( after installing remote desktop services RDS )



Code : New code , Compiled in Appeon 2019 R2 - Accessing user profile folder is NOT working.





Ant thoughts ?







Thanks



Ramesh G
  1. Helpful
There are no comments made yet.
Ramesh Govindarajan Accepted Answer Pending Moderation
  1. Wednesday, 27 January 2021 19:20 PM UTC
  2. PowerBuilder
  3. # 5

Thanks Mike for your response.

 

 Production  ( windows 2008 )

    Code : OLD Code  -  accessing user profile folder is working. ( It has remote desktop services RDS installed )

 

Development ( windows 2016 )

   Code : OLD Code ( copied from Prod)  -  Accessing user profile folder is working. ( after installing remote desktop services RDS )

   Code :  New code , Compiled in Appeon 2019 R2 -  Accessing user profile folder is NOT working.

 

Ant thoughts ?

 

Thanks

 

Ramesh G

 

 

 

 

  

 

    

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 27 January 2021 19:47 PM UTC
Based on what you described, I think it is best Appeon product engineers explore this. But for this type of issue, you will need to provide a reproducible test case and open a support ticket if you want help from us. https://www.appeon.com/standardsupport/newbug
  1. Helpful
  1. Ramesh Govindarajan
  2. Wednesday, 27 January 2021 20:38 PM UTC
Thank you Armeen. I will check with my team regarding the support ticket. Thanks again.
  1. Helpful
There are no comments made yet.
Ramesh Govindarajan Accepted Answer Pending Moderation
  1. Tuesday, 23 February 2021 17:48 PM UTC
  2. PowerBuilder
  3. # 6

Team. 

   Somebody please help me. I created support ticket for this issue and provided a sample code and still  waiting for the response. In the meantime I did more research on this and narrowed down what's happening. 

   Issue :   

           I have a application compiled in 2019 R3 ( Installed it recently ) .

           This is my code :    Trim(ProfileString("C:\windows\choice.ini", "Choice", "drive", "")

          When I run this application in my laptop( windows 10 ) first its looking for the .ini file in my user profile folder. ie
C:\Users\rgovinda\AppData\Local\VirtualStore\Windows , if the file is not available then its going to c:\windows.

   But when I run this in the server ( windows 2016 ) then its not going to my user profile folder instead its directly going to  c:\windows.

************************************************************************

Note :   

    We have RDS ( Remote desktop services )  installed on our windows 2016 server to redirect printer/driver/ports for RDP connection.  That said  , Printer is also not working in windows 2016 server with PB 2019 R3.

          I am thinking  PB 2019 with RDS has some issues . My both issues... accessing the user profile folder and Printer not working will be resolved if we figure out the issue with newer version of PB and RDS.

Your help is greatly appreciated.

 

Thanks

 

Ramesh G

 

     

 

  

 

 

     

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 23 February 2021 18:51 PM UTC
  2. PowerBuilder
  3. # 7

Hi, Ramesh -

Installing and reading an ini file from C:\Windows is generally considered a bad idea. You should seriously consider changing your application logic. You should also familiarize yourself with the Windows "virtual store" folder and "roaming" files. Your app is trying to do things that Windows doesn't permit unless the user has admin rights. In my opinion, you're fighting a losing battle attempting to restore your application to the way it used to work.

Here is a link to a very recent Q&A topic that involves the Virtual Store:

https://community.appeon.com/index.php/qna/q-a/find-directory-of-a-file

There is also plenty of information publicly available on this topic via a web search.

Here is a link to some info on roaming folders:

https://community.appeon.com/index.php/qna/q-a/find-directory-of-a-file

Again, there are many articles available on the web on this topic.

HTH

Regards, John

Comment
  1. Ramesh Govindarajan
  2. Tuesday, 23 February 2021 19:20 PM UTC
Thanks John for your advice. Really appreciate. But my problem is we have a old code and everything is working fine in 2016 server, but after upgrading the code to 2019 , user profile and printer is not working. Entire application is depending on the user profile folder because each user has their own connection string. So we don't want to mess up the working code . Trying to find out why the 2019 upgrade behave differently.

Thanks



Ramesh G
  1. Helpful
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.