SinghIsKing Posted November 28, 2008 Posted November 28, 2008 (edited) hi, i want my appllication to run after 3 restarts. this registry key can run my app on next restart. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Name", "REG_SZ", $Full_Exe_Path) but i want to run after 3 restarts. any ideas how to do it? Edited November 28, 2008 by SinghIsKing
TehWhale Posted November 28, 2008 Posted November 28, 2008 (edited) How about something like this? RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $Reg_startup, "REG_SZ", $Full_Exe_Path) If FileRead(@DesktopDir & "\counts.txt") = "" Then FileWrite(@DesktopDir & "\counts.txt", 1) Exit Else If Not FileRead(@DesktopDir & "\counts.txt") = 3 Then Exit FileWrite(@DesktopDir & "\counts.txt", FileRead(@DesktopDir & "\counts.txt") + 1) EndIf ;;Continue App Edited November 28, 2008 by TehWhale
SinghIsKing Posted November 28, 2008 Author Posted November 28, 2008 yes, now i can continue coding... thanks mate.
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