F5F Stay Refreshed Software Operating Systems Execute CMD with admin privileges during startup

Execute CMD with admin privileges during startup

Execute CMD with admin privileges during startup

M
Mister_Token
Member
202
07-31-2023, 01:31 PM
#1
When I power on my PC, I need the command prompt to launch with admin privileges and run netsh wlan start hostednetwork. Doing it each time feels tedious.
M
Mister_Token
07-31-2023, 01:31 PM #1

When I power on my PC, I need the command prompt to launch with admin privileges and run netsh wlan start hostednetwork. Doing it each time feels tedious.

V
Vinceb11
Member
234
08-10-2023, 07:40 AM
#2
Create a script to prompt for admin rights and execute the desired command. Ensure UAC is enabled if you want to bypass restrictions.
V
Vinceb11
08-10-2023, 07:40 AM #2

Create a script to prompt for admin rights and execute the desired command. Ensure UAC is enabled if you want to bypass restrictions.

S
skwitchy
Junior Member
17
08-31-2023, 06:15 PM
#3
In open notepad, type the instructions and save as a text file with the name matching the pattern you suggested. It should be something like StartHotspot.bat. Make sure to enable viewing file extensions. Then relocate it to the startup directory. Launch the Run dialog (Win+R), enter shellConfusedtartup and press enter. Transfer the file there. You might also consider setting up a scheduled task, though that requires more steps. Edited May 13, 2018 by wkdpaul
S
skwitchy
08-31-2023, 06:15 PM #3

In open notepad, type the instructions and save as a text file with the name matching the pattern you suggested. It should be something like StartHotspot.bat. Make sure to enable viewing file extensions. Then relocate it to the startup directory. Launch the Run dialog (Win+R), enter shellConfusedtartup and press enter. Transfer the file there. You might also consider setting up a scheduled task, though that requires more steps. Edited May 13, 2018 by wkdpaul

S
sugaapie
Junior Member
29
09-02-2023, 02:40 PM
#4
nailed it
S
sugaapie
09-02-2023, 02:40 PM #4

nailed it

T
TonTon246
Junior Member
3
09-02-2023, 10:58 PM
#5
I forgot about the file extension earlier. It was something my friend mentioned before, and now I realized I needed to include it.
T
TonTon246
09-02-2023, 10:58 PM #5

I forgot about the file extension earlier. It was something my friend mentioned before, and now I realized I needed to include it.

J
Jasmijn_De_Kip
Junior Member
17
09-04-2023, 11:52 AM
#6
Oh, sure! It was totally missed.
J
Jasmijn_De_Kip
09-04-2023, 11:52 AM #6

Oh, sure! It was totally missed.

S
slxchii
Junior Member
13
09-09-2023, 12:59 AM
#7
Configure it as a Windows Event through Task Scheduler, and it will execute with the necessary system access without prompting for elevated privileges.
S
slxchii
09-09-2023, 12:59 AM #7

Configure it as a Windows Event through Task Scheduler, and it will execute with the necessary system access without prompting for elevated privileges.