سؤال

I have the following situation: a Linux server hosting a website created by a Perl code. I have created with Perl a button that onclick should start an executable. Problem is the executable is a Windows EXE file. When button clicked it is run on the Linux server and not the Windows side. How do I change the "onclick" to start the EXE (when website is opened in Windows)?

Code for onclick:

onclick="javascript: runExe();"

Tried the following:

    function runExe (){
    system("/Users/xxxx/notepad.exe");
}

    function runExe (){
    system("file://C:/Windows/notepad.exe");
}

    function runExe (){
    open(FH, "c:\Windows\notepad.exe |");
    close(FH);
    }

    function runExe (){
        open(FH, "/Users/xxxx/notepad.exe |");
        close(FH);
    }
هل كانت مفيدة؟

المحلول

The short answer is no, you can't, host your Perlsite on a Windows server if you need to run windows executables. Long answer, you could try to use wine to run the program under linux. Depending on the exe in question, this may not work well.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top