RunProgram() without parameter in IDE

Just starting out? Need help? Post your questions and find answers here.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: RunProgram() without parameter in IDE

Post by BarryG »

blueznl wrote: Thu Oct 07, 2021 3:05 pmTry RunProgram("Notepad.exe"). It'll work.
Yes, because that's an exe in the default file path of Windows (the "%PATH%" environment variable). Press Win+R, type "notepad.exe" and hit Enter. It'll also work, because it's in %PATH%.
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: RunProgram() without parameter in IDE

Post by Mijikai »

On Windows "" will result in the current drive and directory which then in return will execute the explorer as the default program.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: RunProgram() without parameter in IDE

Post by blueznl »

I agree with all of you, I just was puzzled by the different behavior of running it in the IDE versus stand alone executable, that's all :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: RunProgram() without parameter in IDE

Post by blueznl »

This :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply