Jump to content
Sign in to follow this  
Scorekeeper

Deletion program!

Recommended Posts

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 by Scorekeeper

Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 by Scorekeeper

Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites

you need to wrap that Run() with double quotes

Run("C:\setup.exe")

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

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 by Scorekeeper

Fou-Lu - Bof4 "...Wouldst thou fight a god?"

Share this post


Link to post
Share on other sites

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)
EndIf

Waiting 5 min and shutting off PC is a simple sleep timer,

Sleep(1000*60*5)
Shutdown(1+8)
Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...