Reply to Message

View discussion in a popup

Replying to:
pmears
Contributor
Contributor

Variable Entry Point

I have created a package for an Oracle 6i Client Runtime application.  The package.ini file has identified the entry point (correctly) as:

[Client.exe]
  Version.ProductName=Oracle Client Runtime, v3
  Version.Description=Uses Application Virtualization
  Shortcut=runtime.dat
  Source=#25drive_C#25\ORANT\BIN\ifrun60.EXE
  ;Change ReadOnlyData to bin\Package.ro.tvr to build with old versions(4.6.0 or earlier) of tools
  WorkingDirectory=#25drive_C#25\FORMS\
  CommandLine="#25drive_C#25\ORANT\BIN\ifrun60.EXE" C:\FORMS\form5.fmx
  Icon=%drive_C%\FORMS\icon.ico
  Shortcuts=%Desktop%

ifrun60.exe can be passed parameters at runtime, specifically the path and filename of the FMX file which it should open.

It is this parameter that I would like to become variable.

I have sucessfully implemented a "startup.vbs" script that is built along with the package.  My script has the following structure (I have replaced certain code with pseudo-code):

Function OnFirstSandboxOwner

  ' execute ts_origin subroutine

  ' if the config file is found on %drive_c% then

  '     execute worker subroutine

  ' else exit

End Function

Sub ts_origin

  ' copy config file from thinapp run folder and copy to %drive_c%

  '    taken from vmware example code

End Sub

Sub worker

  ' read contents from config.ini into variables

  ' generate tnsnames.ora file from variables onto %drive_c%

End Sub

Everything in my script is now working and doing what I expect it to but I still need to determine how to create an entry point (or some other solution) that allows me to dynamically create the runtime parameter.

In my config.ini file, I have the following section - which would match the default entry point

[FORMS]

type=local

path=C:\FORMS\

name=form5.fmx

but the config.ini file could be updated to

[FORMS]

type=network

path=\\1.2.3.4\forms_dir

name=form10.fmx

in which case the entry point should be changed to:

  WorkingDirectory=\\1.2.3.4\forms_dir
   CommandLine="#25drive_C#25\ORANT\BIN\ifrun60.EXE" \\1.2.3.4\forms_dir\form10.fmx

I read somewhere that maybe including WSCRIPT.EXE as an entry point would be beneficial and I could launch the appropriate command via a second vbScript.  Has anyone done this?

I am open to any and all suggestions.

Reply
0 Kudos