How to reset environment variables from inside Spider Basic's Code?

Just starting out? Need help? Post your questions and find answers here.
santa
Posts: 8
Joined: Tue Mar 15, 2016 6:08 am

How to reset environment variables from inside Spider Basic's Code?

Post by santa »

Dear Fred

In order to run Spider Basic 2.51 and create Android App, I have to define at the same time in System Environment Variables

ANDROID_HOME=c:\Program Files(x86)\SpiderBasic\Android\android\sdk
ANDROID_SDK_ROOT=c:\Program Files(x86)\Spider Basic\Android\android\sdk

BUT I have already installed another software which need to use it.
What to do?

Thanks in Advance.
plouf
Posts: 295
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: How to reset environment variables from inside Spider Basic's Code?

Post by plouf »

Hy you do that ? Sb do it himself no need for this
Christos
santa
Posts: 8
Joined: Tue Mar 15, 2016 6:08 am

Re: How to reset environment variables from inside Spider Basic's Code?

Post by santa »

I have to do it because in other case it does not run

I need to have
ANDROID_HOME=C:\Users\Donal\AppData\Local\Android\Sdk\
ANDROID_SDK_ROOT=C:\Users\Donal\AppData\Local\Android\Sdk\
in order other software to run

But If I have that, SB does not run
It runs if I have
ANDROID_HOME=c:\Program Files(x86)\SpiderBasic\Android\android\sdk
ANDROID_SDK_ROOT=c:\Program Files(x86)\Spider Basic\Android\android\sdk

So, my question is how to do it to work in both worlds?
AZJIO
Posts: 75
Joined: Wed Dec 14, 2022 1:13 pm

Re: How to reset environment variables from inside Spider Basic's Code?

Post by AZJIO »

Make two reg files that will change the variables in the registry key "HKEY_CURRENT_USER\Environment". You can run the batch file by running the reg file and then the IDE. And also add a tool to the IDE, which upon completion will make changes to the registry. The IDE allows you to choose when to run the tool. You will have to make an effort to do this. In this case, you will not be able to use both tools at the same time.
santa
Posts: 8
Joined: Tue Mar 15, 2016 6:08 am

Re: How to reset environment variables from inside Spider Basic's Code?

Post by santa »

AZJIO wrote: Thu Feb 01, 2024 5:19 am Make two reg files that will change the variables in the registry key "HKEY_CURRENT_USER\Environment". You can run the batch file by running the reg file and then the IDE. And also add a tool to the IDE, which upon completion will make changes to the registry. The IDE allows you to choose when to run the tool. You will have to make an effort to do this. In this case, you will not be able to use both tools at the same time.
Thank You. I got it. It is a good solution to locate ONLY the specific two variables and do what you said.
I wonder if in a future version except of JDK directory, it could be added a field in spider basic for SDK directory to be completed.
Post Reply