Ostap Posted January 30, 2019 Posted January 30, 2019 Hi, I am writing a long script that among other things, should retrieve list of folders. Sometimes folder access requires different account. I can create query box that would ask for credentials and pass them to the function, but is there a way to run _FileListToArray with different credentials?
Nine Posted January 30, 2019 Posted January 30, 2019 (edited) how about #RequireAdmin ? or you can use RunAs or RunAsWait to execute part of your script with different users ? Edited January 30, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Ostap Posted January 30, 2019 Author Posted January 30, 2019 Thanks for suggestions. However, different account are not administrators, just different user account that have access to certain folder on a shared drive. RunAs allows running external program or batch script in Command prompt, not AutoIt function.
Nine Posted January 30, 2019 Posted January 30, 2019 17 minutes ago, Ostap said: RunAs allows running external program or batch script in Command prompt, not AutoIt function You can create an .exe autoit and run it with runas, so yes it is possible to use _filelisttoarray with diff credentials ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now