DOWNLOAD Smarters Windows Player With Remote DNS

FelixSchrodinger

Well-known member
Joined
Jun 17, 2022
Messages
256
Awards
3
Offline
No install needed and fully portable if done right. but issue with all electron apps is they remain open under task manager even after you close the app.

Managed to fix that. Won't act like a coding whizz though, I had help from ChatGPT 4.

Need to import exec function from child_process module in Node.js

const { exec } = require('child_process');

Then need to add event listener and execute taskkill command upon closing the app:

mainWindow.on('closed', () => { // Terminate the process with the specified name exec('taskkill /IM YourProcessName.exe /F', (error, stdout, stderr) => { if (error) { console.error(`Error executing taskkill: ${error}`); return; } console.log(`Process terminated: ${stdout}`); }); mainWindow = null; });

Replace YourProcessName with the name of your process. The original was KINGTV.exe.

I've attached the updated /resources/app/www/app.js as a text file (wouldn't let me to upload .js file), keeping original "KINGTV" name for easy find/replace.
 

Attachments

  • app.txt
    2.5 KB · Views: 93
Last edited:

eoghan

Member
Joined
Aug 15, 2021
Messages
73
Awards
1
Offline
Managed to fix that. Won't act like a coding whizz though, I had help from ChatGPT 4.

Need to import exec function from child_process module in Node.js

const { exec } = require('child_process');

Then need to add event listener and execute taskkill command upon closing the app:

mainWindow.on('closed', () => { // Terminate the process with the specified name exec('taskkill /IM YourProcessName.exe /F', (error, stdout, stderr) => { if (error) { console.error(`Error executing taskkill: ${error}`); return; } console.log(`Process terminated: ${stdout}`); }); mainWindow = null; });

Replace YourProcessName with the name of your process. The original was KINGTV.exe.

I've attached the updated /resources/app/www/app.js as a text file (wouldn't let me to upload .js file), keeping original "KINGTV" name for easy find/replace.
More on this if you change your app name to have a space in it like "App Name" then change this part of the code

exec('taskkill /IM KINGTV.exe /F', (error, stdout, stderr) => {

to

exec('taskkill /IM "App Name.exe" /F', (error, stdout, stderr) => {

the quotes are important or the command will fail
 

eoghan

Member
Joined
Aug 15, 2021
Messages
73
Awards
1
Offline
Think i'll have a look at swapping out the video player to something more up to date
 

AfterLife

Well-known member
VIP Member
Joined
May 15, 2021
Messages
1,123
Awards
4
Offline
Managed to fix that. Won't act like a coding whizz though, I had help from ChatGPT 4.

Need to import exec function from child_process module in Node.js

const { exec } = require('child_process');

Then need to add event listener and execute taskkill command upon closing the app:

mainWindow.on('closed', () => { // Terminate the process with the specified name exec('taskkill /IM YourProcessName.exe /F', (error, stdout, stderr) => { if (error) { console.error(`Error executing taskkill: ${error}`); return; } console.log(`Process terminated: ${stdout}`); }); mainWindow = null; });

Replace YourProcessName with the name of your process. The original was KINGTV.exe.

I've attached the updated /resources/app/www/app.js as a text file (wouldn't let me to upload .js file), keeping original "KINGTV" name for easy find/replace.
Thank you pal
 
Last edited:

atravis77

New member
Joined
Jul 9, 2021
Messages
25
Awards
1
Offline
Hi guys
I share the steps with which I managed to personalize, in case someone else can help you. Without detracting from our partner

[B]RainBow[/B]

Thank you.:


1. Install Visual Studio Code
2. Install NodeJs package libraries (URL : https://nodejs.org/en)
3. Install Resource Hacker to customize the .exe (http://www.angusj.com/resourcehacker/)
4. We install Inno Setup (https://jrsoftware.org
)
5.Creation of MultiDNS (windns.html) Here we will handle the DNS) > This must be in our Hosting.


After the Tools are installed:

6. We unzip the Folder (KINGTV)
7. We open the Resources folder.
8. From the Resources folder, right-click, open a PowerShell terminal and run the command From the Resources folder, right-click, open a PowerShell terminal and run the command
(
Code:
 npx asar extract app.asar app
).
9. Now we will have the decompiled code, we proceed to make the changes we want.


Personalization :

10. We will place the URL of our DNS that we have previously uploaded to the Hosting: we go to the route: Resources/app/www/js/

We open the util.js file with Visual studio Code and in Line 8 we will place the URL of our DNS >
11. In the Path: resources\app\LOGO we can Customize The Logos, favicon, etc...

12. In the Route: resources\app\www\images We can customize the Home background, Home Logo, Login Background, Etc.

13. in Path : resources\app\www
Inside the app.js file

Line 20 label: "NAME", change the Name
Line 44 label: "NAME" change the name

14. in Path : resources\app\www
Change favicon.ico

15. In the Path: resources\app\www\js
Inside the main.js file

Line 13 We will indicate if we want MultiDNS or SingleDNS
multiDNS : true
either
multiDNS : false

16. In the Path: resources\app

Change favicon.ico - favicon.png
in the package.json file we customize the name



17 - We open Resource Hacker
We change the Icon and the description of our executable.

18. We pack again
Code:
 npx asar pack app app.asar

After the packaging process ends, we proceed to delete the app folder


18. CREATION OF OUR .exe INSTALLER

NOTE> this step is optional, if we want to have an installer for end users.

19. We open Inno Setup and create a New Setup Script Wizard
- We complete the information > name, Version, URL etc...
- We select the destination Folder of our installation. (default is :program Files)
- We place the Name for our folder
- We select whether or not we want users to be able to change this name.
- We select the location of our already customized .exe
- We add the main Folder (the one that contains < Locales / resources and all the other files.
- We select the other options that we want and finish our Script.

20 We compile our Script and we will have our Setup.exe ready
This procedure worked great first time...thanks so much to you and

RainBow!!!!​

 

Lucas14

Member
VIP Member
Joined
Apr 26, 2023
Messages
40
Awards
1
Offline
do the steps exactly as stated but when i enter my details to log in it just keeps loading.

ask. Changing the url to the latest includes windns.html.

I have tried it like this and it gives me a credential error.
 
Last edited:

Awarlow

Active member
Joined
Apr 2, 2023
Messages
33
Awards
3
Offline
Hi guys
I share the steps with which I managed to personalize, in case someone else can help you. Without detracting from our partner

[B]RainBow[/B]

Thank you.:


1. Install Visual Studio Code
2. Install NodeJs package libraries (URL : https://nodejs.org/en)
3. Install Resource Hacker to customize the .exe (http://www.angusj.com/resourcehacker/)
4. We install Inno Setup (https://jrsoftware.org
)
5.Creation of MultiDNS (windns.html) Here we will handle the DNS) > This must be in our Hosting.


After the Tools are installed:

6. We unzip the Folder (KINGTV)
7. We open the Resources folder.
8. From the Resources folder, right-click, open a PowerShell terminal and run the command From the Resources folder, right-click, open a PowerShell terminal and run the command
(
Code:
 npx asar extract app.asar app
).
9. Now we will have the decompiled code, we proceed to make the changes we want.


Personalization :

10. We will place the URL of our DNS that we have previously uploaded to the Hosting: we go to the route: Resources/app/www/js/

We open the util.js file with Visual studio Code and in Line 8 we will place the URL of our DNS >
11. In the Path: resources\app\LOGO we can Customize The Logos, favicon, etc...

12. In the Route: resources\app\www\images We can customize the Home background, Home Logo, Login Background, Etc.

13. in Path : resources\app\www
Inside the app.js file

Line 20 label: "NAME", change the Name
Line 44 label: "NAME" change the name

14. in Path : resources\app\www
Change favicon.ico

15. In the Path: resources\app\www\js
Inside the main.js file

Line 13 We will indicate if we want MultiDNS or SingleDNS
multiDNS : true
either
multiDNS : false

16. In the Path: resources\app

Change favicon.ico - favicon.png
in the package.json file we customize the name



17 - We open Resource Hacker
We change the Icon and the description of our executable.

18. We pack again
Code:
 npx asar pack app app.asar

After the packaging process ends, we proceed to delete the app folder


18. CREATION OF OUR .exe INSTALLER

NOTE> this step is optional, if we want to have an installer for end users.

19. We open Inno Setup and create a New Setup Script Wizard
- We complete the information > name, Version, URL etc...
- We select the destination Folder of our installation. (default is :program Files)
- We place the Name for our folder
- We select whether or not we want users to be able to change this name.
- We select the location of our already customized .exe
- We add the main Folder (the one that contains < Locales / resources and all the other files.
- We select the other options that we want and finish our Script.

20 We compile our Script and we will have our Setup.exe ready

I cannot get this working 😫 I follow all steps but when it comes to repacking I end up with a Kingtv and kingtv_original app. I assume I select the non original one with my logo for when you mention select location of already modified exe?


Also when you say We add the main Folder (the one that contains < Locales / resources and all the other files. Do we select the complete kingtv folder that includes both kingtv & Kingtv_original as well as resources, locales and all other bits?
 

Bladet

Well-known member
Joined
Feb 20, 2022
Messages
60
Awards
3
Offline
This was pretty fun, i have made everything according to the instruction and got it to work, exept one thing.
When the app starts i still see KINGTV in the white window top border, but i can see my logo so i guess that the only thing left for me to find out ;)
 

FelixSchrodinger

Well-known member
Joined
Jun 17, 2022
Messages
256
Awards
3
Offline
This was pretty fun, i have made everything according to the instruction and got it to work, exept one thing.
When the app starts i still see KINGTV in the white window top border, but i can see my logo so i guess that the only thing left for me to find out ;)
Use Notepad++ find in files and it will show you everywhere where there is "KINGTV"
 

Lum4n4r3

Active member
Joined
Jul 30, 2022
Messages
66
Awards
3
Offline
What i need to write on this windns.html just only portal ?

yes, your portals should be inside
no need any code only blank windns.html and inside portal.
Because i have doing something and is still in Loading when i put username and passowrd.
$.ajax({
type: "POST",
url: "https://mywebsite.com/windns.html", here in windns.html i put only portal.
data: "a=dns",
success: function (result) {
console.log(result);
// localStorage.setItem('serverDNS',result);
Main.serverURL = result;
},
error: function (error) {
console.log('Wrong Details');
}
});
return Text;
 
Last edited:

Bladet

Well-known member
Joined
Feb 20, 2022
Messages
60
Awards
3
Offline
no need any code only blank windns.html and inside portal.
Because i have doing something and is still in Loading when i put username and passowrd.
example inside the .html

1 http://yourdns1:8080,http://yourdns2:8080,

then upload it to your hosting

Goto Resources/app/www/js/util.js

edit the file on Line 8 place the URL that point to the .html file you uploaded


** 1 DNS is maybe this setting **

15. In the Path: resources\app\www\js
open main.js file

Line 13 We will indicate if we want MultiDNS or SingleDNS
multiDNS : true
either
multiDNS : false
 
Last edited:

Lum4n4r3

Active member
Joined
Jul 30, 2022
Messages
66
Awards
3
Offline
example inside the .html

1 http://yourdns1:8080,http://yourdns2:8080,

then upload it to your hosting

Goto Resources/app/www/js/util.js

edit the file on Line 8 place the URL that point to the .html file you uploaded


** 1 DNS is maybe this setting **

15. In the Path: resources\app\www\js
open main.js file

Line 13 We will indicate if we want MultiDNS or SingleDNS
multiDNS : true
either
multiDNS : false
i have already done,was little bit very hard to understand but now is fine,i have made my apps windows :d
 
Top