chrisT Posted April 7, 2014 Share Posted April 7, 2014 Hi, I require #RequireAdmin to run Schtask.exe i.e create a Windows Scheduled Task, however, if I do then when running the following I will not see any network drives. #RequireAdmin ;Comment Out = NO SCHEDULE TASK CREATED, Not Commented Out = Can't access Network Drives #include <MsgBoxConstants.au3> $CMD = 'schtasks /Create /tn "TESTDEL" /tr "\"C:\Program Files (x86)\AutoIt3\SciTE\Koda\FD.exe\"" /sc weekly /d MON /st 17:00 /RL HIGHEST /F' EnvSet("PATH", @WindowsDir & "\sysnative;" & EnvGet("PATH") ) $iCreateSchedule = Run('"' & @ComSpec & '" /k ' & $CMD, @SystemDir) Example() Func Example() ; Create a constant variable in Local scope of the message to display in FileSelectFolder. Local Const $sMessage = "Select a folder" ; Display an open dialog to select a file. Local $sFileSelectFolder = FileSelectFolder($sMessage, "",6) If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No folder was selected.") Else ; Display the selected folder. MsgBox($MB_SYSTEMMODAL, "", "You chose the following folder:" & @CRLF & $sFileSelectFolder) EndIf EndFunc ;==>Example Exit Does anyone have any suggestions, I'm lost on this...Thanks Link to comment Share on other sites More sharing options...
Solution jguinch Posted April 7, 2014 Solution Share Posted April 7, 2014 Maybe this can help you ? Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
chrisT Posted April 8, 2014 Author Share Posted April 8, 2014 (edited) Maybe this can help you ? Wow that worked a treat! Thanks jguinch it's appreciated! Curious how did you even know that? I'm guessing "Been there done that!!" ..lol Edited April 8, 2014 by chrisT Link to comment Share on other sites More sharing options...
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