-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathComputer.js
More file actions
39 lines (28 loc) · 1.07 KB
/
Copy pathComputer.js
File metadata and controls
39 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/***
* Copyright (C) Rodolfo Herrera Hernandez. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root
* for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* For related information - https://github.com/codewithrodi/ZendaJS/
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
// Using native function of Zenda
var OperativeSystem = System.Platform();
Console.Log(OperativeSystem);
// Show current working directory/current path/current location
Console.Log(System.CurrentWorkingDirectory());
// Using sleep for wait and execute instructions after wait
Console.Log('Showing network interface in next 5 seconds...');
Sleep(5000);
// Executing command by OS
if(OperativeSystem.startsWith('WIN')){
// Running command
System.Execute('ipconfig');
}else{
// If not OS == WIN(Windows), is probably derived from UNIX.
// Ipconfig for UNIX OS == ifconfig
System.Execute('ifconfig');
}