possible to check if the x86 programs folder exists?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
possible to check if the x86 programs folder exists?
is it possible to check if the x86 programs folder exists on windows?
Re: possible to check if the x86 programs folder exists?
If you use Lua's own io it should be possible, but I don't think love's filesystem can reach there.
Re: possible to check if the x86 programs folder exists?
oki, thanks comrade.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: possible to check if the x86 programs folder exists?
Well, why not checking the env variable PATH ?
Code: Select all
local function is_windows()
return (package.config:sub(1,1) == '\\')
end
local function has_pfx86()
return is_windows()
and (os.getenv('PATH'):match('Program Files %(x86%)')~=nil)
end
print('Does the folder Program Files (x86) exist ?', has_pfx86())
Re: possible to check if the x86 programs folder exists?
There's also the environment variable ProgramFiles(x86) that points to this directory if it's a 64-bit Windows.
Shallow indentations.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 3 guests