java - Starting netsh wlan start hostednetwork needs administrator privilege to run -


i want access command prompt of windows , run command starts hostnetwork, can start hand, try run through java.

this i've tried

process p = runtime.getruntime().exec("cmd /c netsh wlan start hostednetwork"); 

but gives message:

you must run command command prompt administrator privilege.

any solution, or there better way that?

this windows question rather java question, you're looking runas.exe.


Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -