SDelete with Uninst_UVK_AtLogon.uvk
Forum rules
We have no special rules for UVK forums. Just try to be polite and clear in your posts.
Please don't post spam in this forum. Spammers will be banned by IP, e-mail and username.
We reserve the right to delete all posts and ban all users we consider not having respected these rules without warning.
We have no special rules for UVK forums. Just try to be polite and clear in your posts.
Please don't post spam in this forum. Spammers will be banned by IP, e-mail and username.
We reserve the right to delete all posts and ban all users we consider not having respected these rules without warning.
SDelete with Uninst_UVK_AtLogon.uvk
Hey,
I wanna be able to remove the content of a folder or the whole folder (Full of repair tools) when the PC is restarted. Is it possible to perform this after PC reboot # 2, or only after the first PC reboot?
This was my current attempt... with no luck - which follows on from Fred's UVK command.
<UVKCommandsScript>
<RunWait> -h
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART /rl HIGHEST /delay 0005:00 /f
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "<SDelete> %Desktop%\Repair Tool Software"
I wanna be able to remove the content of a folder or the whole folder (Full of repair tools) when the PC is restarted. Is it possible to perform this after PC reboot # 2, or only after the first PC reboot?
This was my current attempt... with no luck - which follows on from Fred's UVK command.
<UVKCommandsScript>
<RunWait> -h
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART /rl HIGHEST /delay 0005:00 /f
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "<SDelete> %Desktop%\Repair Tool Software"
Re: SDelete with Uninst_UVK_AtLogon.uvk
Wait, I think I found out, Trying to run a UVK command through the SchTasks.. Anyway, if someone can assist me in my project that would be awesome 

-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: SDelete with Uninst_UVK_AtLogon.uvk
I need to go to bed but here is the best hint I can find at the moment.... From MSDN:
/SC schedule
A value that specifies the schedule frequency. Valid values are: MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONLOGON, ONIDLE, and ONEVENT.
ONSTART is not listed in the /SC params, it's actually in the /MO params
/SC schedule
A value that specifies the schedule frequency. Valid values are: MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONLOGON, ONIDLE, and ONEVENT.
ONSTART is not listed in the /SC params, it's actually in the /MO params
Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
Re: SDelete with Uninst_UVK_AtLogon.uvk
WRC, <SDelete> is a UVK scripting keyword, and thus is only understood by UVK. Windows does not recognize it.
Replace the last command with this one:
Don't forget the quotes around %Desktop%\Repair Tool Software. They're needed there.
Replace the last command with this one:
Code: Select all
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%Desktop%\Repair Tool Software'"
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
Re: SDelete with Uninst_UVK_AtLogon.uvk
Thank you, I appreciate your help.Fred wrote:WRC, <SDelete> is a UVK scripting keyword, and thus is only understood by UVK. Windows does not recognize it.
Replace the last command with this one:Don't forget the quotes around %Desktop%\Repair Tool Software. They're needed there.Code: Select all
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%Desktop%\Repair Tool Software'"
Re: SDelete with Uninst_UVK_AtLogon.uvk
Can't understanndddd coddesss, or i just did it all wrong.... Trying to schedule automatic UVK uninstall & software folder. UVK uninstalls, however files wont delete.
Still trying to get the system to delete files Automatically:
<UVKCommandsScript>
<RunWait> -h
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART /rl HIGHEST /delay 0005:00 /f
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%Desktop%\Repair Tool Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%MyDocs%\Downloads\Repair Tool Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%MyDocs%\Downloads\Repair Tool Software.zip'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair Tool Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair Tool Software.zip'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair _Tool_Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair_Tool_Software.zip'"
Still trying to get the system to delete files Automatically:
<UVKCommandsScript>
<RunWait> -h
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART /rl HIGHEST /delay 0005:00 /f
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%Desktop%\Repair Tool Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%MyDocs%\Downloads\Repair Tool Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%MyDocs%\Downloads\Repair Tool Software.zip'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair Tool Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair Tool Software.zip'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair _Tool_Software'"
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair_Tool_Software.zip'"
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: SDelete with Uninst_UVK_AtLogon.uvk
"/SC" does not have the value, "ONSTART." "/TN" is supposed to be a unique identifier and you are repeating the name several times therefore not making it unique.
This is according to MSDN documatation.
This is according to MSDN documatation.
Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
Re: SDelete with Uninst_UVK_AtLogon.uvk
Jim, this is taken from a Windows command prompt help file in CHM format I downloaded from Microsoft.
Syntax:
Parameters
Thus the ONSTART value is valid for /SC. As for /TN, you're absolutely correct, and I didn't spot that one.
Jono,
You need to give each task a different name, except for the Uninstall UVK on startup ones. Those have the same name for this command to work on XP.
Additionally, you are using the RD (rmdir) command to delete files. That won't work. RD only removes folders. Use DEL /F /Q 'File Path' instead, for files.
Syntax:
Code: Select all
schtasks /create /sc <ScheduleType> /tn <TaskName> /tr <TaskRun> [/s <Computer> [/u [<Domain>\]<User> [/p <Password>]]] [/ru {[<Domain>\]<User> | System}] [/rp <Password>] [/mo <Modifier>] [/d <Day>[,<Day>...] | *] [/m <Month>[,<Month>...]] [/i <IdleTime>] [/st <StartTime>] [/ri <Interval>] [{/et <EndTime> | /du <Duration>} [/k]] [/sd <StartDate>] [/ed <EndDate>] [/it] [/z] [/f]
Code: Select all
/sc <ScheduleType>
Specifies the schedule type. Valid values are MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE.
Jono,
You need to give each task a different name, except for the Uninstall UVK on startup ones. Those have the same name for this command to work on XP.
Additionally, you are using the RD (rmdir) command to delete files. That won't work. RD only removes folders. Use DEL /F /Q 'File Path' instead, for files.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
Re: SDelete with Uninst_UVK_AtLogon.uvk
I also noticed the file and folder removal commands don't have the /SC and /RU parameters (my fault, I guess).
The main problem with this code is that it will create several tasks and leave them in the system. Windows will run those tasks every time the system boots. Uninstall UVK on startup is not important, because UVK_en.exe no longer exists, but %Comspec% does exist, so it will be executed, increasing boot time.
I would remove those files immediately, instead, unless you have a problem with it.
Code: Select all
<UVKCommandsScript>
<RunWait> -h
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART /rl HIGHEST /delay 0005:00 /f
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup" /tr "%ComSpec% /c rd /s /q '%Desktop%\Repair Tool Software'" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup 2" /tr "%ComSpec% /c rd /s /q '%MyDocs%\Downloads\Repair Tool Software'" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool zip On Startup" /tr "%ComSpec% /c del /f /q '%MyDocs%\Downloads\Repair Tool Software.zip'" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup 3" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair Tool Software'" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool zip On Startup 2" /tr "%ComSpec% /c del /f /q '%UserProfile%\Downloads\Repair Tool Software.zip'" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool Folder On Startup 4" /tr "%ComSpec% /c rd /s /q '%UserProfile%\Downloads\Repair _Tool_Software'" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Delete RepairTool zip On Startup 3" /tr "%ComSpec% /c del /f /q '%UserProfile%\Downloads\Repair_Tool_Software.zip'" /ru System /sc ONSTART
I would remove those files immediately, instead, unless you have a problem with it.
Code: Select all
<UVKCommandsScript>
<RunWait> -h
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART
%SystemDir%\schtasks.exe /create /tn "Uninstall UVK on startup" /tr "'%UVKDir%\UVK_en.exe' -Uninst -Auto" /ru System /sc ONSTART /rl HIGHEST /delay 0005:00 /f
%ComSpec% /c rd /s /q "%Desktop%\Repair Tool Software"
%ComSpec% /c rd /s /q "%MyDocs%\Downloads\Repair Tool Software"
%ComSpec% /c del /f /q "%MyDocs%\Downloads\Repair Tool Software.zip"
%ComSpec% /c rd /s /q "%UserProfile%\Downloads\Repair Tool Software"
%ComSpec% /c del /f /q "%UserProfile%\Downloads\Repair Tool Software.zip"
%ComSpec% /c rd /s /q "%UserProfile%\Downloads\Repair _Tool_Software"
%ComSpec% /c del /f /q "%UserProfile%\Downloads\Repair_Tool_Software.zip"
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
Re: SDelete with Uninst_UVK_AtLogon.uvk
You guys can download the Windows command line reference here:
https://www.microsoft.com/en-us/downloa ... px?id=2632
https://www.microsoft.com/en-us/downloa ... px?id=2632
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.
Fred
Fred
-
- Posts: 1529
- Joined: Sun May 25, 2014 7:44 am
- Location: Missouri
Re: SDelete with Uninst_UVK_AtLogon.uvk
Fred
I did not realize you wrote the code that Jono was trying to get to work. To be honest with you it never occurred to me too download the windows command line documentation as I was looking at the MSDN documentation which should be newer. In this case it seems as though it was wrong though.
Glad you got it figured out for Jono though
I did not realize you wrote the code that Jono was trying to get to work. To be honest with you it never occurred to me too download the windows command line documentation as I was looking at the MSDN documentation which should be newer. In this case it seems as though it was wrong though.
Glad you got it figured out for Jono though

Jim
It is not "Can it be done?" but rather, "How can we do it?"
It is not "Can it be done?" but rather, "How can we do it?"
Re: SDelete with Uninst_UVK_AtLogon.uvk
Thank you;
Appreciate your support
Appreciate your support