ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > LaunchBar Commander

One config for x86 and x64

<< < (2/3) > >>

towlerg:
Sorry I wasn't clear. I'm trying to create one set of config files that will work on both 32 bit and 64 bit OS's

Assuming that on 32bit OS all apps in C:\Program files and that on 64bit OS apps are either in C:\Program files or C:\Program files (x86).

If I replace C:\Program files with %\ProgramFiles% in an existing config, all x86 applications are available on both 32 and 64 bit OS's. But an application ie. Notepad+ which has an x86 version on the 32 bit OS and a x64 version on 64 bit OS is not available on the 64 bit OS.

Another way to describe it would be that %ProgramFiles% expands to C:\Program files on the 32 bit OS and C:\Program files (x86) on the 64 bit OS, but not also C:\Program files on the 64 bit OS. 

A truth table of my atempt to unify LBC configs on both 32 bit and 64 bit OS using the %ProgramFiles% replacment

32bit OS      x86 app     OK       
32bit OS      x64 app      -
64bit OS      x86 app     OK
64bit OS      x64 app     fails

I hope I haven't laboured the point but several posts can to different conclutions about my objective.

George

KodeZwerg:
My guess is, that LBC is 32bit; thats why it uses 32bit environment. (resulting that %ProgramFiles% lead to the x86 variant.) I re-check.

4wd:
A truth table of my atempt to unify LBC configs on both 32 bit and 64 bit OS using the %ProgramFiles% replacment

32bit OS      x86 app     OK       
32bit OS      x64 app      -
64bit OS      x86 app     OK
64bit OS      x64 app     fails
-towlerg (October 23, 2018, 10:09 AM)
--- End quote ---

So basically test for an executable under \Program Files first with fallback to an executable under \Program Files (x86) if not found in \Program Files.

towlerg:
@4wd Yes, you made it sound so simple. I assume you're looking at a solution internal to LBC, whereas I thought perhaps I'd missed some clever OS function. Either ways fine with me.

So expand %FunctionFiles% into C:\Program Files, check for presence of exe, if found execute, else expand to C:\Program Files (x86), check for presence of exe, if found execute, else quit.

4wd:
@4wd Yes, you made it sound so simple. I assume you're looking at a solution internal to LBC, whereas I thought perhaps I'd missed some clever OS function. Either ways fine with me.

So expand %FunctionFiles% into C:\Program Files, check for presence of exe, if found execute, else expand to C:\Program Files (x86), check for presence of exe, if found execute, else quit.
-towlerg (October 23, 2018, 06:49 PM)
--- End quote ---

It'd be simpler, (for the end user), to have mouser implement it in LBC, another alternative is to run an intermediate command/script that checks for the existence of an executable.

eg. .\TestX64.cmd \notepad++\notepad++.exe

TestX64.cmd would check Program Files and then Program Files (x86) prepending whichever was valid to the given parameter, eg. so for x64 system/app you'd end up with something like: %SYSTEMDRIVE%\Program Files\notepad++\notepad++.exe

I think whispering in mouser' ear is a nicer solution ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version