This repository was archived by the owner on Nov 21, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,14 @@ async function changeDns (index, ip) { // eslint-disable-line
9090 const infIndex = index || await getActiveAdapterIndex ( )
9191 const cmd = `WMIC nicconfig where "InterfaceIndex = ${ infIndex } " call SetDNSServerSearchOrder ("${ ip } ")`
9292 logger . info ( `about to changeDns to ${ ip } ` )
93- return execute ( cmd )
93+ return sudoExec ( cmd )
9494}
9595
9696async function changeGateway ( index , ip ) { // eslint-disable-line
9797 const infIndex = index || await getActiveAdapterIndex ( )
9898 const cmd = `WMIC nicconfig where "InterfaceIndex = ${ infIndex } " call SetGateways ("${ ip } ")`
9999 logger . info ( `about to changeGateway to ${ ip } ` )
100- return execute ( cmd )
100+ return sudoExec ( cmd )
101101}
102102
103103async function getRouterIP ( ) { // eslint-disable-line
@@ -126,15 +126,15 @@ async function infNameToIndex (infName) {
126126
127127async function enableDHCP ( index ) {
128128 const cmd = `WMIC nicconfig where "InterfaceIndex = ${ index } " call EnableDHCP`
129- return execute ( cmd )
129+ return sudoExec ( cmd )
130130}
131131async function enableStatic ( index , ip , mask ) {
132132 const cmd = `WMIC nicconfig where "InterfaceIndex = ${ index } " call EnableStatic ("${ ip } "),("${ mask } ")`
133- return execute ( cmd )
133+ return sudoExec ( cmd )
134134}
135135async function emptyDNS ( index ) {
136136 const cmd = `WMIC nicconfig where "InterfaceIndex = ${ index } " call SetDNSServerSearchOrder`
137- return execute ( cmd )
137+ return sudoExec ( cmd )
138138}
139139
140140class Win {
You can’t perform that action at this time.
0 commit comments