I have a number of scripts that I use in Vista for manipulating my dev environment. In some cases, these scripts require elevated permissions to execute properly. Is there a way to
- Detect from script that you are not executing in an environment with the appropriate permission
- Automatically launch a new console requesting the elevated permission
I always operate in a least privelege environment, so I don't elevate permissions unless I really need to. Unfortunately, I don't always remember which scripts/functions require elevation, so having the scripts help me automate this would be awesome.