0phoi5 Posted June 29, 2016 Share Posted June 29, 2016 Hi all, I'm looking at making a script on a CD-ROM, that will; recognise the operating system of the machine it has been inserted in to run a specific script for that operating system Is there a cross-platform script/code language that would be recognised by both Windows and OSX, as a standard build? I understand that Python, for example, could run on both, however this would require the user to have installed it. Is there a language that both OSX and Windows would recognise straight-out-of-the-box? I tried a few internet searches, but everything I find pretty much states you have to download additional files to the PC (e.g; installing Python), which is no good. Thank you. Quote Link to comment Share on other sites More sharing options...
vertygo Posted June 29, 2016 Share Posted June 29, 2016 I'm not 100% sure, but I think you have to burn the CD a certain way, with different 'partitions' for lack of a better word. Google HFS and ISO9660 partitions / Hybrid CDs Quote Link to comment Share on other sites More sharing options...
0phoi5 Posted June 30, 2016 Author Share Posted June 30, 2016 I see, so I'd need to make the script in 2 different languages, but the computer the CD is inserted in to would load a different partition, with the appropriate script in? Quote Link to comment Share on other sites More sharing options...
fugu Posted July 3, 2016 Share Posted July 3, 2016 I know a really ugly way to do this, it kinda works but is going to throw some errors in the process. you create a .bat file like auto.bat: #/bin/sh goto label0 ./MacOSX_program exit 0 label0: .\Windows_program.exe The windows OS will see that the filename has a .bat extension. I doesn't know what #/bin/sh means so it throws an error, but continues on. It follows the goto the label0 and then runs the Windows_program.exe. The mac OS will ignore the .bat extension, but read #/bin/sh as a shell script. it will error on the goto, but continue on to run the MacOSX_program Quote Link to comment Share on other sites More sharing options...
0phoi5 Posted July 5, 2016 Author Share Posted July 5, 2016 On 03/07/2016 at 6:15 PM, fugu said: I know a really ugly way to do this, it kinda works but is going to throw some errors in the process. you create a .bat file like auto.bat: #/bin/sh goto label0 ./MacOSX_program exit 0 label0: .\Windows_program.exe The windows OS will see that the filename has a .bat extension. I doesn't know what #/bin/sh means so it throws an error, but continues on. It follows the goto the label0 and then runs the Windows_program.exe. The mac OS will ignore the .bat extension, but read #/bin/sh as a shell script. it will error on the goto, but continue on to run the MacOSX_program Interesting workaround, thank you. I'll have to have a play with this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.