-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHotspot.c
79 lines (66 loc) · 2.32 KB
/
Hotspot.c
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include <stdio.h>
#include <process.h>
#include <string.h>
int main()
{
system("color f9");
system("mode con: cols=50 lines=60");
int choice=0;
do {
printf("\n***********************************************\n");
printf(" Hotspot Configuration: :\n\n");
printf(" 1. Allow and Start Hotspot ...\n");
printf(" 2. Stop and disallow Hotspot...\n");
printf(" 3. Show Hotspot Informations...\n");
printf(" 4. Open Wifi Configuration...\n");
printf(" 5. Change when laptop hibernate...\n");
printf("\n***********************************************\n");
printf(" 0. Exit...\n");
printf("\n***********************************************\n");
printf("\n Choose a number : ");
printf("\n --> ");
scanf("%d",&choice);
switch(choice)
{
case 0:
system("exit");
break;
case 1:
printf("\n");
system("ncpa.cpl");
system("netsh wlan set hostednetwork mode=allow");
system("netsh wlan start hostednetwork");
system("netsh wlan show hostednetwork");
printf("P.S. This will open wi-fi configuration!'...\n Right-click on Wi-Fi -> Properties \n -> Share Tap -> Enable first option\n Choose The Hotspot in Dropdown, Press Ok\n\n");
system("pause");
system("cls");
break;
case 2:
printf("\n");
system("netsh wlan stop hostednetwork");
system("netsh wlan set hostednetwork mode=disallow");
system("netsh wlan show hostednetwork");
system("pause");
system("cls");
break;
case 3:
system("netsh wlan show hostednetwork");
system("pause");
system("cls");
break;
case 4:
system("ncpa.cpl");
system("cls");
break;
case 5:
system("control /name Microsoft.PowerOptions /page pagePlanSettings");
system("cls"); // control /name Microsoft.System pour Version Windows
break;
default:
printf("\n Choix invalide ! \n"); //devmgmt.msc pilotes //desk.cpl projecter Win+P + resolution //systeminfo tous infos de PC
system("pause");
system("cls");
}
}while (choice != 0);
return 0;
}