Problems with BR on Windows virtual machine running on Linux

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Mikhail
Posts: 87
Joined: Tue Jul 07, 2009 10:26 am
Location: Ukraine

Problems with BR on Windows virtual machine running on Linux

Postby Mikhail » Fri Apr 18, 2014 6:48 am

We are experiencing some problems with Client/Server BR on a Windows Server 2008 virtual machine running on a Linux server.

Problem 1:

An example of a shell call from our software:

execute “sy –M f:\pjc_apps\bcbs_mst.01\pjcbcb~1.exe”

does not work, because Linux removes the space between -M and the f:\pjc_apps\bcbs_mst.01\pjcbcb~1.exe.

Problem 2:

Linux doesn't like MS-DOS names such as pjcbcb~1.exe

Does anyone know any workarounds for this? It would suck to have to comb through hundreds of programs and check all our execute statements and MS-DOS names.

gordon
Posts: 309
Joined: Fri Apr 24, 2009 6:02 pm

Re: Problems with BR on Windows virtual machine running on L

Postby gordon » Sun Apr 20, 2014 6:28 am

This sounds like a problem relating to the Windows emulator.

What emulator are you using?

Have you considered using WINE?

GomezL
Posts: 232
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Re: Problems with BR on Windows virtual machine running on L

Postby GomezL » Sun Apr 20, 2014 8:37 am

f:\pjc_apps\bcbs_mst.01\pjcbcb~1.exe

Start by shelling CTRL-] from BR, and try the command directly from the CMD prompt. That often helps to figure things out.

The second issue. pjcbcb~1.exe is the "8.3 Short Name" for the file. It is not actually the "Guaranteed Name", for example it might end up being pjcbcb~2.exe . This is particularly true when you start moving things around, renaming, etc.

The "Long term answer" is to use the "LONG NAME"

For example instead of C:\Progra~1, use C:\Program Files.

The good news is that BR is able to help with this type of task, so it doesn't have to be manual.

We export our source code to a folder on the network, and then using Notepad++, we can search for text in programs. In this case, a regular expression. Before we did this, we wrote BR scripts to perform similar tasks (Through every program).

Sounds to me you want something like List '~1' '.exe'

The "Regular Expression" for Notepad++ would be: .*~1.*\.exe

Basic Reference document for Regular Expressions http://www.aprelium.com/abyssws/articles/regex-basics.html

The "Proc" in BR to fix something like this would be

Fix_Longname.prc

Code: Select all

list 'pjcbcb~1.exe' rep 'pjcbcb long version.exe'
list 'pjcbcb~1.exe' rep 'pjcbcb long version.exe' >redir.[session]
subproc redir.[serssion]

list 'other~1.exe' rep 'otherlong version.exe'
list 'other~1.exe' rep 'otherlong version.exe' >redir.[session]
subproc redir.[serssion]



The you just load the program (In a proc if you like I think there is a RELOAD sample somewhere).

LOAD PROGRAM1
SUBPROC Fix_Longname.prc

LOAD PROGRAM2
SUBPROC Fix_Longname.prc

PS: I intentionally ignored "Quotes", and that might matter as long file names tend to use quotes.

We build a Library:

23120 DEF LIBRARY Fnexe(Exe_Parameters$*32,Exe_Name$*256;Exe_Filename$*256,Exe_Add_Parameters$*2048)

The we call the fnexe as appropriate.

using your example

FNEXE("-M QUOTES=NONE","execute “sy –M f:\pjc_apps\bcbs_mst.01\pjcbcb~1.exe”,"Optional_Filename_1","Optional Additional Parameters")

Quotes=None is an option the FNEXE recognizes, it tells it not to add quotes to the "EXE_FILENAME$"

By using a library, you can perform quite a bit of cleanup, trap for problems, etc. It is also a good way to prepare for Client Server.


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 2 guests

cron