1
votes

We have a PowerBuilder 12.1 application that we have been running on a Windows 2008 R2 64 bit server. We are trying to get this application to run in our new XenApp Citrix environment. If a profile does not exist for the user when the PB app is launched the profile begins to be created - it's creating all kinds of directories and subdirectories. Not sure why. But, before the profile is completed, it blows up and execution is aborted. If the user, without a profile runs WordPad first - a profile is created correctly. Once a profile is created the PB app can be launched without a problem. We put a popup dialog in the PB app in the second line of the main program and when there is no profile and the execution aborts, the popup never gets invoked. Once a profile is created, as with WordPad, then the PB app is launched, the popup is displayed as expected.

Has anyone see behavior such as this? I'm not sure what could be causing this and do not have access to the Citrix server and it is managed by our Tech Services group. They are saying that it must be the PB app that is the problem. I'm not so sure. Any ideas on how we might trouble shoot this problem would be greatly appreciated. PB apps should be able to be run in Citrix, right? I don't know what the start up process is for a PB app in this kind of environment but I would think that execution would start in the main program. Is this correct?

thanks In Advance, Bill44077

1
Voting -1 without any explanation is not quite constructive :(Seki
Sorry - if I knew more I could probably answer myself. :( I created a simple PowerBuilder app with a window and a button. It runs fine in Windows 2008R2. When I put this same PowerBuilder app into Citrix, it requires Admin privledges to run (and create the profile). Without admin privs - it aborts while creating the profile in Citrix. If the user profile already exists then the app runs in Citrix without admin privs. Something in Citrix is keeping the app from creating a profile without admin privs. Help!Bill Campbell
I did not vote -1 myself, I was commenting for the one that did without telling why. I will give a try in the french PB forums, fwiw...Seki
Thanks for the info Seki - I am hoping that I can understand how to run a PowerBuilder app in Citrix without having to take a Citrix Certification class. I'm confident that others are doing this as hosting apps in Citrix is a quite common practice - unfortunately just completely new for me.Bill Campbell
What is the error when it aborts? And what is on the first line before the messagebox?Hugh Brackett

1 Answers

0
votes

If you cannot keep user profile on Citrix due to permissions this works well and you can use it for web based apps or n-tier apps (on server side).

Add a database table to your system to simulate PB profile functionality.

New Table:

// citrix_user_profile (new table pseudo-code)
// 
// id = identity, not null
// userid = type of userid in your DB, not null
// filename = char, not null
// section = char, not null
// key = char, not null
// value = char null

1. Create new custom non-visual user object: n_user_profile

2. Add instance variables similar to:

protected:

// todo: write a setter and getter
boolean ib_use_windows_profile = false

constant int FAIL = -1
constant int SUCCESS = 1

3. Add function defined similar to:

int = of_setprofilestring(string as_filename, string as_section, string as_key, string as_value)

Coded something like:

// If windows profile use PB standard function,
// otherwise use citrix user profile logic

If this.ib_use_windows_profile Then

    Return SetProfileString(as_filename, as_section, as_key, as_value)

Else

    // Pseudo-Code
    //
    // Does an entry exist in the database for this user, filename, section, key?
    // Yes: Update the table with the new value
    // No: Insert entry to the table with values

    Return this.SUCCESS  // success or fail

End If

4. Add function similar to:

string = of_profilestring(string as_filename, string as_section, string as_key, string as_default)

Coded like:

// If windows profile use PB standard function,
// otherwise use citrix user profile logic
// if you don't have access to user info then
// add it to the argument list.

If this.ib_use_windows_profile Then

    Return ProfileString(as_filename, as_section, as_key, as_default)

Else

    // Pseudo-Code
    //
    // Does an entry exist in the database for this user, filename, section, key?
    // Yes: Return the 'value' from DB
    // No: Return the default value passed via parameter

    Return as_default // or value from database

End If

5. Use the new non visual, call your setter to set windows profile instance variable and then use your new functions in place of PB standard profile functions.