I have done 'shell:startup' in the Run box and created a shortcut to PowerShell there but it never starts! I am using ...powershell.exe -NoExit -WindowsStyle minimized. If I click this shortcut manually then it runs, so what is missing please?
I am not sure of your goal here.
So, if you have this as a shortcut on your desktop / taskbar. Why are you going to the Run dialog box?
Like you said, you can just click the shortcut and it works. You, of course could also, just assign it a shortcut keyboard as well.
On my default Win10 rig, shell:startup, opens Windows Explorer to the current user '\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup'. Just as it would if one did it directly in the Windows Explorer input box.
Is your goal to override this for some reason?
I am trying to start an Admin PowerShell Session when the computer starts, that is all. I was trying to use shell:startup to create the shortcut there but it fails; so I have done a workaround: Create a scheduled task (Logon) using ...powershell.exe -NoExit -WindowsStyle minimized -ExecutionPolicy remotesigned. Then check the Run With Highest Privileges box and an Admin PowerShell session is created.
Yea, that whole throwing things in that folder like we used to do back in the day, on Windows 10 is really not much of a thing that I've seen folks do or want to do any more.
Like the workaround (Logon scripts) you decided to go with, that is what I've been using since Windows 7 SP1, because I can do this via GPO directly to system in my lab.
Others have been taking that route as well. See...
There are other ways of course to do this other than using the startup folder or scheduled task.
...and the other work around if you are insistent on the Startup folder, is to create a .cmd or .bat file that uses the good old DOS start command to fire off your shortcut.
So, say create a start.cmd file, located in the StartUp folder with your shortcut, which contains...
... or whatever other program(s) you wish to start that has a shortcut there.
Point of Note:
...and scheduled task is just more direct and prudent IMHO.
You must be logged in to reply to this topic.