Jass Posted July 15, 2010 Share Posted July 15, 2010 Hey out there, I wrote a script for backing up a MySQL database on our managed server. Here are the first lines of my script, where the problem is: ;Includes for functions _RunDOS and _Now() #include <Process.au3> #include <Date.au3> #RequireAdmin ;Read variables from ini-file ;Read IE and Scriptpath from ini-file $IE = iniread("values.ini","Backup","IE","") ;Start IE and run Backupscript on server run ($IE) ;Wait 5 minutes until killing IE sleep(300000) ProcessClose("iexplore.exe") The ini file says for IE: IE=c:\Program Files\Internet Explorer\iexplore.exe http://www.mydomain.de/backup/backup.php My problem is that, planned as a task, the script doesn't call Internet Explorer or Mozilla Firefox (I tried with both). If I run the script manually it works and the browser with the given URL is opened and the backup runs. Any idea why??? My system runs under Windows Server 2008 R2 x64. Thanks in advance jass Link to comment Share on other sites More sharing options...
tannerli Posted July 15, 2010 Share Posted July 15, 2010 Hi Jass Run("C:\Programme\Internet Explorer\iexplore http://www.autoitscript.com") The above command works well for me, so the only possible problem in the script is the IniRead() Try adding a default value for the iniRead so you can isolate the problem... f.e. just output the content of $IE after reading it to see what it contains, or you could try $IE = iniread("values.ini","Backup","IE","C:\Windows\System32\calc.exe") and run it, if the calculator starts, you have to correct your ini file... Cheers tannerli Link to comment Share on other sites More sharing options...
Bert Posted July 15, 2010 Share Posted July 15, 2010 You may need to put your INI string inside quotes in the INI. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Jass Posted July 15, 2010 Author Share Posted July 15, 2010 Thanks for your help but I think the problem is Windows Server and not AutoIt. I tried with quotes and without and the last I tried just: Run("calc.exe") Worked when exe-file was called manually but not thought the task planner. Maybe Windows Server doesn't allow exe-files to call other exe's??? 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