Scorekeeper Posted June 2, 2005 Posted June 2, 2005 (edited) I need a script to. Delete file C:fire.exe if the file is not there then delete C:fire2.exe. Then empty recyle bin. Then run C:setup.exe. This would help as i have been having major porblems with my pc. Thanks a lot if you can. It is urgent so plz help. Edited June 2, 2005 by Scorekeeper Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Blue_Drache Posted June 2, 2005 Posted June 2, 2005 I need a script to.Delete file C:fire.exe if the file is not there then delete C:fire2.exe.Then empty recyle bin.Then run C:setup.exe.This would help as i have been having major porblems with my pc.Thanks a lot if you can.It is urgent so plz help.<{POST_SNAPBACK}>If FileExists("C:\fire.exe") then FileDelete("C:\fire.exe") Else FileDelete("C:\fire2.exe") Endif FileRecycleEmpty() Run(C:\setup.exe)FileDelete() bypasses the Recycle Bin, but I put the code in as requested. Really, this could have been written on your own with a little research in the help file. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Scorekeeper Posted June 2, 2005 Author Posted June 2, 2005 I know i could of but i really needed it, Thanks a lot. Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Scorekeeper Posted June 2, 2005 Author Posted June 2, 2005 (edited) What is wron i get the error. ERROR: syntax error (illegal character) Run (C: ITS OK i fixed it. help. Also, would you delete a folder the same way. Edited June 2, 2005 by Scorekeeper Fou-Lu - Bof4 "...Wouldst thou fight a god?"
MSLx Fanboy Posted June 2, 2005 Posted June 2, 2005 you need to wrap that Run() with double quotes Run("C:\setup.exe") Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Scorekeeper Posted June 2, 2005 Author Posted June 2, 2005 (edited) I know this is a lot to ask but how do you make it delete a folder. (figured thatout) i have searched and can not find anything. Also how do you make it run at start up.(can't do this). Help. Or wait 5 mins and turn of pc. Edited June 2, 2005 by Scorekeeper Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Blue_Drache Posted June 2, 2005 Posted June 2, 2005 (edited) I know this is a lot to ask but how do you make it delete a folder. (figured thatout)i have searched and can not find anything.Also how do you make it run at start up.(can't do this). Help.Or wait 5 mins and turn of pc.<{POST_SNAPBACK}>Running at startup requires the insertion of a registry key, or a shortcut in the user's startup menu.$reg = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "PROGRAMNAME") If @error = -1 Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "PROGRAMNAME", "REG_SZ", @ScriptFullPath) EndIf If $reg <> @ScriptFullPath Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "PROGRAMNAME", "REG_SZ", @ScriptFullPath) EndIfWaiting 5 min and shutting off PC is a simple sleep timer,Sleep(1000*60*5) Shutdown(1+8) Edited June 2, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
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