then removing the shadow, and the shadow stuff requires admin access.0 3 * * * env DISPLAY=:1.0 /usr/bin/FreeFileSync/FreeFileSync /home/joe/FreeFileSyncBackup/SyncSettings.ffs_batch We have a number of tasks that do not have triggers in the task scheduler, but are triggered by autoit scripts (I'd have to revisit the scripts in question, but I seem to remember that a normal user can start a task that has admin rights, one of our scripts allowed a user to trigger a sync to a backup location, the program in the task creating a shadow volume, doing an ffsync from that. There other more complicated ways to trigger a task (WMI/Objects) but the simple run of schtasks.exe works for us. (many possibilities, semaphores maybe, or just a registry or filesystem change) RunWait is a different matter, the program run by the task would have to signal the waiting program in some way when it completed. Local $cmdline = & '\schtasks.exe /run /tn "Do Sync (Task Name)"' Run ( $cmdline, , ) It's fairly easy to trigger a task (see schdtasks.exe) I really believe the best way to occasionally trigger items with admin access on locked down systems is with the Task Scheduler, otherwise your left with authentication issues. I would like to not use Windows Task Scheduler _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.īack up and restore Windows user files _3 - Modified array functions that include support for 2D arrays. I hereby grant any person the right to use any code I post, that I am the original author of, on the forums, unless I've specifically stated otherwise in the code or the thread post. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude Give a programmer the correct code and he can do his work for a day. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to. If I posted any code, assume that code was written using the latest release version unless stated otherwise. So I was hoping for some tips on what to look for try. RunAsWait ( $sUsername, , $sPassword, 2, '"' & $filesyncprog & '"' & " " & $filesyncbatchprog, "", ) This is however not part of the problem as I have this working fine. ini file for the correct path or using a default path. I just din't want to include them as the path is not relevant. There is nothing wrong with the path or the variables. $filesyncprog = "C:\FreeFileSync\filesync.exe" -or - $filesyncprog = "C:\FreeFileSync\" & "filesync.exe"Īnd your right, it's not even part of the code, I just wanted to explain what the Variables are in converted a litle to much to code, and I can't edit my post yet. $filesyncprog = "C:\FreeFileSync\" and "filesync.exe" ConsoleWrite ( Debug(' & & ') : $filesyncprog = ' & $filesyncprog & & '>Error code: ' & & ) # Debug Console Local $iReturn = RunAsWait ( $sUsername, , $sPassword, 2, '"' & $filesyncprog & '"' & " " & $filesyncbatchprog, "", ) Select case $iReturn = 0 _FileWriteLog ( $LogFile, "Synchronize PSVs completed without warnings!" ) $filesyncprog = "C:\FreeFileSync\" and "filesync.exe" $filesyncbatchprog = "C:\Backup\" and "backup_batch.ffs_batch" I think that there are some thing with the Admin rights that I have gotten wrong: I can run it on my laptop (admin rights) and I can run it when logged in as an admin, so the batch file works. I would like to not use Windows Task Scheduler as I have encountered some problems with that in the past on Windows 10. I get it to work with Task Scheduler, but Instead of having that doing it ones a day, I want Aoutit to do it after 4 hours and starting the task in case it's not running. I can't seem to get Autoit to start the batch file with admin rights. Hi I'm working on locking down the PCes we are delivering, but I want to have a backup (freefilesync) running in the background on the restricted User.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |