clarkster26 Posted July 21, 2014 Share Posted July 21, 2014 I cannot get it to run inside of autoit. If I take the same command and dump it in a console it works fine. What am I missing? BitsAdminCheck() Func BitsJob() ;Checks if job is running and creates it if it is not If Not FileExists("C:bitstransferLibreOfficeLibreOfficePortable.exe") Then RunWait(@ComSpec & " /c 'bitsadmin.exe /create libre", @SW_HIDE) RunWait(@ComSpec & " /c bitsadmin.exe /addfile libre 192.168.10.11installationNetworkInstall$libreLibreOfficePortable.exe c:bitstransferLibreOfficeLibreOfficePortable.exe", @SW_HIDE) RunWait(@ComSpec & " /c bitsadmin.exe /resume libre", @SW_HIDE) Else If FileExists("C:bitstransferLibreOfficeLibreOfficePortable.exe") Then Inst_LibOff() EndIf EndIf EndFunc ;==>BitsJob Func BitsAdminCheck() ; Bitsadmin verify and install if needed If Not FileExists("C:\Windows\System32\bitsadmin.exe") Then FileInstall("C:scriptsbitsinstallerbitsadmin.exe", "C:\Windows\System32\bitsadmin.exe", 1) ElseIf FileExists("C:\Windows\System32\bitsadmin.exe") Then DirSetup() EndIf DirSetup() EndFunc ;==>BitsAdminCheck Func DirSetup() ; Creates the dir to copy file or files on workstation Local $sFldr1 = "C:bitstransfer" Local $sFldr2 = "C:bitstransferLibreOffice" If DirGetSize($sFldr2) <= 0 Then DirCreate($sFldr1) DirCreate($sFldr2) Else BitsJob() EndIf EndFunc ;==>DirSetup Func Inst_LibOff() ;script to install libre EndFunc ;==>Inst_LibOff Link to comment Share on other sites More sharing options...
clarkster26 Posted July 21, 2014 Author Share Posted July 21, 2014 I cannot even get this to runRunWait("C:\Windows\System32\bitsadmin.exe /create libre", @SW_SHOW)Forgot to mention I am running this on XP but hope to run it on Win7 as well.AutoIt version is 3.3.8.1 if that matters. Link to comment Share on other sites More sharing options...
Developers Jos Posted July 21, 2014 Developers Share Posted July 21, 2014 (edited) That line is different than in your script where it has an extra ' character. Also see you are missing a backslash after 192.168.10.11 on the next line. What is the working directory when you run the commands manually in a CMD window? Are you running under Admin credentials and have you tried #RequireAdmin? Jos edit: Tested with this single line and worked fine for me: RunWait(@ComSpec & " /k bitsadmin.exe /create libre") Edited July 21, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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