Deye

Mapped drive & #RequireAdmin

3 posts in this topic

#1 ·  Posted

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 

Or

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

Thanks

Share this post


Link to post
Share on other sites



#3 ·  Posted

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