Jump to content

Script to monitor how long a USB has been plugin.

Recommended Posts

Need help on my script. I got two codes to work the monitor I'm trying to use. Both of them are working, I just want to convert this part to exe file but I'm getting an error message

@echo off
eventcreate /t SUCCESS /ID 365 /L System /SO Alert /D "USB Backup drive was plugged in %date% %time%"
Set now=%date%
Set now1=%time%
taskkill /f /im counter.exe /t
del /f /s /q C:\Counter
Set Counter=0
if %Counter%==7 GOTO Event
Del /f /q c:\Counter\%Counter%.txt
Set /A Counter+=1
echo > C:\Counter\%Counter%.txt
ping -n 86400
eventcreate /t WARNING /ID 365 /L System /SO Alert /D "USB Backup drive needs to be Swapped. The drive was plugged in last %now% %now1%"

I think I would need help converting the code to .au3.

Edited by stupidout
Link to comment
Share on other sites

Start with the helpfile and see what parts you think relate to your script then knock something together and then post it so the members can guide you.

Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...