Jump to content

Mapped drive & #RequireAdmin

Recommended Posts


Hi everyone,

when adding #RequireAdmin to the script I cannot do anything with mapped drives

Is there a way to start a script elevated, then at the point needed, start another script -started- de-elevated "without prompts" with DriveGetDrive in it, and have it return the outcome to the first script
should i use WM_COPYDATA to pass an array 


How can I start the script de-elevated which is started from an elevated one
Run DriveGetDrive and pass the array to the script itself using exit ShellExecute(@ScriptFullPath, "<array>", @ScriptDir, "runas")
I saw somewhere some winapi_ command that has something to do with passing an array as parameters, and I cant seem to find it right now ..

These workarounds seem odd and bit puzzling to me, are they any other better\cleaner ways to achieve this


Share this post

Link to post
Share on other sites

Thanks, Got it!,
Once I got the drive, how can I make the script acknowledge these drives when using _FileListToArray (for instance, doesn't find anything)
 Does the same workaround stand or can I with some command make these drives accessible to the main script as well

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.