UVK Help: Scripting commands

Show menu

Introduction to UVK scripting

This page explains how UVK scripts work, and lists all related commands. Scripts allow you to access all UVK features from a simple plain text file, which is executed in UVK's Run scripts section.

UVK scripts use a very dynamic language that supports many simple commands to run the built-in fixes, download files from the internet, delete files and folders, create and terminate processes and much more.

UVK scripts also support code in other scripting languages, such as AutoIt, VBScript, cmd batch and regedit code.

The UVK scripting language also supports several automation functions which in turn allow to automate applications by sending mouse clicks and keystrokes to the application's window and controls.

Finally, UVK scripts can contain lines from the logs created in the Scan and create log section. You just need to copy the desired lines from the UVK log to your new UVK script, and the corresponding registry entries and files will be deleted when the script is run. Just like HijackThis or OTL does.


How to create scripts

To easily create a UVK script, use the Log analyzer. It inserts the commands in one click, allows drag an drop to create file and folder paths, automatically creates maintenance and repair scripts, helps you to read the UVK log and create scripts that automate applications.

The Log analyzer also displays tooltips each time you insert a command or keyword, which help you to understand the script's code.

UVK scripts support two types of statements. Multiline commands (also called modes), and single line commands.

The syntax for multiline commands is:

<Mode keyword>

Command 1
Command 2
And so on...

The Mode is the keyword of multiline commands. It's on the top of a sequence of lines and tells UVK to do the same action to the lines below until the mode is changed to a different one, or the end of the script is reached. Examples of mode keywords are <Reg>, <Delete>, <RunWait>, and <UpdateSoftware>.

For instance, if the mode is <Reg>, then the lines just below the mode keyword contain regedit code to merge; if the mode is <RunWait> then the lines below contain commands to execute; if the mode is <AutoItScript> then the lines below contain AutoIt code to execute.

A command is a statement that uses only one line.

The Mode keyword can be preceeded by a few white spaces, but not the commands underneath it. Blank lines are ignored.

UVK supports all Windows environment variables like %windir%, %systemroot%, %userprofile%, %temp%, %systemdrive%, %allusersprofile%, %programfiles%, %comspec%, %appdata%, etc. (all case insensitive).

We also added support for eight more variables to simplify writing common paths (case insensitive):

%InstallSourceDir% The folder where the setup/portable package from which UVK was launched/installed resides.
For instance, if UVK is launched from F:\tools\UVKPortable.exe, this variable will expand to F:\tools
%ThirdParty% The Third party folder, inside the UVK's directory.
%ProgramFiles(x86)% For 64 bits Windows, it's the path of the Program files (x86) folder.
For 32 bits Windows, it the same as %ProgramFiles%
%UVKDir% Path to UVK's installation folder.
%LocalAppData% Path of Local Application Data.
%Desktop% Path of current user's desktop.
%MyDocs% Path of current user's documents folder.
%CommonDocs% Path of common documents folder.
%SystemDir% Path of the system directory (Usually C:\Windows\System32).
%UVKExe% The fully qualified path of the UVK's executable.
%PublicDesktop% The path of the common desktop folder (usually C:\Users\Public\Desktop).

These variables are expanded in all modes except <Reg>, <CmdScript>, <AutoItScript> and <VBScript>.

UVK scripting may seem complicated at the first sight, but you will soon figure out it's very simple, in fact. We'll explain everything in detail here. Techs and geeks that are used to scripts often will certainly enjoy the AutoIt, VBScript and cmd batch integration support, and the Automation functions.

The Automation functions allow you to automate your third party applications in an easy way.

Section index
Pre-repair actions The commands in this section are usually executed in the begining of a script
Multi-line commands These modes execute one or several commands in the lines underneath
Built-in scans These commands execute and automate third party applications
Reset actions Each of these commands resets one or several Windows features to their defaults
Windows fixes These are commands that execute fixes for well-known Windows issues
File system actions Commands related to the file system and hard disk volumes.
Essential updates Commands that automatically update essential applications such as Java and Flash.
Maintenance actions Commands to run in your everyday's Windows maintenance.
Repair and optimize Commands that repair and/or optimize the whole Windows operation system.
Windows Troubleshooters Commands that run all the existing Windows troubleshooters. system.
Post-repair actions Commands that are cormally executed in the end of the script.
Automation Automate third party applications by simmulating mouse clicks and keystrokes.
Log analyzer This special text editor helps you to create UVK scripts and analyze UVK logs.


See also:

Creating UVK scripts

Using scripting modes and commands


Pre-repair actions
<KillNonTrustedProcesses>Kill all processes whose publisher is not part of a trusted list.
<KillNonSystemProcesses>Kill all processes which executable files are not system protected files.
<KillNonSignedProcesses>Terminate the processes whose files are not digitally signed.
<KillNonCriticalProcesses>Kill all non critical processes.
<StopNonMsServices> Stop all non Microsoft running services.
<DeleteAllRestorePoints>Delete all existing system restore points.
<CreateRestorePoint> Create a restore point named UVK Fix.
<BackupRegistry> Perform a registry backup in a specific part of the script.
<RestoreRegistry> Perform a registry restore.
<UnlockFileExtensions> Modify the most important file associations.
<FileExtension> Fix one or several file extensions.
<ProtectFileExtensions> Prevent modifying the most important file associations.
<FreePhysicalMemory> Release memory used by the applications by emptying their working set.
<ImunizeSystem> Immunize or un-immunize one or more areas.
<EnableUAC> Enable the User Account Control.
<DisableUAC> Disable the User Account Control.
<EnableAutoplay> Enable the Windows autoplay function for all drives.
<DisableAutoplay> Disable Windows autoplay function for all drives.
<EnableAdminAccount> Enable the built-in hidden admin account.
<DisableAdminAccount> Disable the built-in hidden admin account.
<AutoLogon> Enable auto-logon for a user profile.
<DisableAutoLogon> Disable auto-logon, if it was previously enabled.
<PreventShutdown> Prevent this PC from rebooting or shutting down until the current script is fully parsed.
<EnableF8BootMenu> Enable the old legacy F8 boot menu on Windows 8 or higher
<RestoreBootMenu> Restore the normal boot menu on Windows 8 and higher.
<EnableWinRE> Enable the Windows Recovery Environment.
<BackupDesktopIcons> Save the layout of the desktop icons.
<EnableMsiInSafeMode> Enable the Windows Installer service to run in safe mode.
<DisableMsiInSafeMode> Disable the Windows Installer service when in safe mode.

↑Back to the section index


Multi-line commands
<Comment>Insert comments in the script.
<Reg>Merge the regedit code specified in the lines listed below this keyword.
<Delete>Move the files listed in the lines below this keyword to the recycle bin.
<SDelete> Permanently delete the files listed in the lines below this keyword.
<ReplaceFile> Replace the files listed in the lines below this keyword.
<SReplaceFile> Replace the files listed in the lines below this keyword.
<Run>Run the commands or automation functions specified in the lines below this keyword.
<RunWait>Run the commands below, and wait until each one ends execution.
<KillProcess>Kill the processes listed in the lines in the lines below this keyword.
<CmdScript>Run the CMD batch code specified in the lines listed below this keyword.
<AutoItScript>Run the AutoIt script code specified in the lines listed below this keyword.
<VBScript>Run the Visual basic script code specified in the lines listed below this keyword.
<Download>Download the files listed in the lines below this keyword from the internet.
<UpdateSoftware> Download files from the internet only if the local files are not updated.
<UnzipFile>Unzip zip files listed in the lines below this keyword to the specified folders.

↑Back to the section index


Built-in scans
<UAKScan>Launch Ultra Adware killer and automatically start a scan for all users.
<MBAMScan>Update Malwarebytes AntiMalware and start a threat scan.
<SASScan>Update Super AntiSpyware and start a scan.
<RogueKillerScan> Download RogueKiller only if it is not already up to date, and run the application.
<TDSSKillerScan> Update TDSSKiller from Kaspersky and start a threat scan.
<AswMBRScan>Update AswMBR and start a scan.
<AdwCleanerScan> Update AdwCleaner and start a scan.
<AvastBCScan>Update Avast! Browser Cleanup and run the application.

↑Back to the section index


Reset actions
<IEStartPages> Reset Internet Explorer's start page to Google or Yahoo.
<ResetMSEdge> Reset Microsoft Edge's preferences to their defaults.
<ResetIEAndInternet> Reset the Internet explorer settings and Windows internet settings to their defaults.
<ResetChrome>Reset Google chrome preferences and extensions. The cache and cookies will not be affected.
<ResetFirefox>Reset Firefox preferences and extensions. The cache and cookies will not be affected.
<ResetHostsAndDns> Reset the hosts file to its defaults and flush the DNS.
<FlushDNS>Clear the DNS cache.
<ResetIPWinsockProxy> Reset the IP, winsock and proxy settings in the local computer.
<ResetSecuritySettings> Grant access to some important registry and file system locations.
<ResetGroupPolicy> Reset the local group policies to their defaults.
<ResetUserShellFolders> Reset the registry entries for the User Shell Folders key.
<ResetNumLockOn> Set the NumLock state ON at Winlogon for all users.
<ResetPrintSpool> Clear and reset the print spooler queue.
<ResetCDBurnQueue> Reset the CD/DVD burning queue.
<ResetWLAN>Reset everything related to WIFI, including saved profiles and passwords.
<ResetGWX>Remove all Windows 10 upgrade notifications.
<UnpinAllStartTiles> Remove all the tiles from the Start Menu.
<ResetServicesStartTypes> Reset the start type of the protected Win32 services.
<ResetWindowsStore> Reset the Windows Store without changing account settings.
<ResetFileAssociations> Reset the custom file associations for the current user account and fix the registry permissions for file associations.

↑Back to the section index


Windows fixes
<FixInstallProblems> Repairs the most common problems related to software installation.
<RunInstallUninstallFix>Download and run the Microsoft Install/Uninstall troubleshooter.
<FixWMIAndSR> Repair the WMI core and the system restore service.
<FixWindowsUpdate> Enable and repair the Windows update service.
<FixWindowsSidebar>Repair and optionally reset the Windows sidebar.
<FixWindowsFirewall> Repair, enable and repair the Windows firewall.
<FixIEAndWindowsShell> Repair possible Windows shell hijacks and repair Internet explorer.
<FixIEHistory> Repair corrupted Internet Explorer's history.
<FixShortcutsUrlsProtocols>Repair the desktop and internet shortcuts file associations.
<FixUserDesktop> Enable the current user's desktop, the icons displaying and the context menu.
<FixSubSystemsKey> Repair the values in the HKEY_LOCAL_MACHINE\\...\\SubSystems registry key.
<FixGroupAccess> Add the \"Local service\" and \"Network service\" members to the administrators group.
<FixAppsNotResponding>Increase the time windows waits before marking the applications as \"Not responding\".
<FixBrowserShortcuts> Repair hijacked browser's desktop and start menu shortcuts.
<FixWinStoreApps> Re-registers the Windows store and repairs the Metro apps. Only for Windows 8 or higher.
<FixUserProfiles> Detect and repair corrupted user profiles.
<FixTaskScheduler> Repair Task scheduler related errors. This fix is not available for Windows XP.
<FixWifiLongWait> Repair the issue of Windows taking too long to connect to a saved Wifi network.
<FixEventSystemService> Use this command if you can no longer login to your account.
<FixPcNotShownInNetwork> Configure and start a few Windows services that are required for a computer to be visible in the network.
<FixChromeBlackWindow> Fix the issue of when Chrome is launched it displays a non working, entirely black window.

↑Back to the section index


File system actions
<RebuildIconCache> Recreate the icon cache database.
<UnhideUserFiles> Recursively unhide hidden files in the current user's profile directory.
<UnhideDir>Recursively unhide hidden files in the specifyed directory or drive.
<ScheduleChkDskOnReboot>Schedule the system partition to be varified by on the next reboot.
<CancelChkdskOnReboot>If the system partition has been scheduled to be verifyed on reboot, this fix will cancel it.

↑Back to the section index


Essential updates
<UpdateChrome> Install/Update Google Chrome.
<UpdateFirefox> Install/Update Mozilla Firefox.
<UpdateKLiteCodeckPack> Install/Update the K-Lite Codec Pack.
<Update7Zip> Install/Update 7-Zip.
<UpdateDirectX> Update the DirectX in unattended mode.
<UpdateJava>Update Java in unattended mode.
<UpdateFlash>Update the Flash player plugin and activeX in unattended mode, for all installed browsers.
<UpdateShockwave> Update the Adobe shockwave player in unattended mode.
<InstallNetFramework> Install the non installed versions of .NET Framework in unattended mode.
<InstallVC++>Install the Visual Studio runtime in unattended mode.
<InstallWin8Gadgets> Download the 8GadgetPack from addgadgets.com and silently install it.
<InstallSURT>Download and run the System Update Readiness Tool in unattended mode.
<PatchMyPC> Automatically update any outdated software in the local PC.

↑Back to the section index


<CleanupRecentList> Cleanup references to recently accessed\r\n items.
<ClearIEHistory> Clear the Internet Explorer's history for the current user.
<ClearEdgeHistory> Clear Browsing History for MS Edge.
<ClearChromeHistory> Clear Browsing History for Google Chrome.
<ClearFirefoxHistory> Clear Browsing History for Mozilla Firefox.
<ClearWaterfoxHistory> Clear Browsing History for Waterfox.
<ClearAllBrowsersHistory> Clear Computer, IE, Chrome and Firefox's browsing history.
<DeleteBrowsersCookies> Delete the cookies for all the installed internet browsers.
<ClearEventLogs> Reset these event logs: Application, Security, Setup, System and Internet Explorer.
<ClearErrorReports>  This command clears thousands of useless error reports.
<ClearShellCache> The Windows shell saves folder view, position and size in a registry database.
<CleanupMUICache> Clear the Shell'slist for the current user.
<FreeStorageSpaceGUI> Displays a dialog box that lets you select and remove file system items.
<SmartUninstaller> Launch the Smart Uninstaller in a separate instance.
<CleanAllUsersTemp> Empty the temporary folders for all users, also empties the recycle bin.
<EmptyTempFolders> Empty the temporary folders. This command doesn't empty the recycle bin.
<EmptyBrowsersCache> Empty the cache for all the installed internet browsers.
<CleanupAppData> Some programs leave empty appdata sub-directories behind. It will remove those folders.
<CleanMSIOrphanFiles> Safely remove Windows installer orphan files.
<RunFullDiskCleanup> Run the Windows disk cleanup utility and scan the system drive.
<AutoDiskCleanup> Run the Windows disk cleanup utility, scan the system drive and automatically free disk space.
<UpdateWindows> Search for Windows updates and automatically download and install the available ones.
<CleanupTrayIconCache>Cleanup the tray icon cache for all users.
<RunMemDiagOnReboot> Schedule memdiag to perform the memory diagnostics on the next system boot.
<CancelMemDiag>If you previously scheduled the memory diagnostics on reboot, this fix will cancel it.
<DeleteTempProfiles> Safely remove the late Windows Update isssue of logging users in to a temporary profile.
<WiFiManager> List the saved profiles and connect, disconnect, delete and set their connection priority.
<CleanupSystemProfile> Delete useless folders in the System profile.

↑Back to the section index


Repair and optimize
<CleanupRegistry>Cleanup the registry the same way the System booster does.
<CleanupJunkFiles>Cleanup the junk files the same way the System booster does.
<ActivateWinFromBIOS> Attempt to activate Windows using the OEM product key stored in the BIOS.
<RunScfScan> Run the system protected resources scan (sfc.exe /scannow).
<RegisterSystemDLLs>Register all Windows DLL OCX and CPL files.
<DismWindowsRepair> Repairs Windows corrupted files using DISM.exe.
<DefragAndOptimize>Optimize the Windows boot and shutdown, and defragment the hard drives.
<DefragDrive> Defragment a hard disk volume.
<OptmizeBoot> Optimize the system boot by applying a few tweaks and defragging the boot files.
<OptimizeShutdown> Optimize the system shutdown by applying a few tweaks that make Windows shut down faster.
<CleanupWinSxS>Free up HDD space by removing files from previous Windows versions.
<RemoveKB4532693> Uninstall the KB4532693 update, which is known for causing issues on Windows 10.
<RemoveKB4537821> Uninstall the KB4537821 update, which is knownor causing issues on Windows 8.1
<ReinstallWindows10> Download and run the Windows 10 installation Tool
<DismRepairGUI> Run DISM with the desired command line switches.
<SfcScanGUI> Run the System File Checker with the desired command line switches.
<CheckDiskGUI> Run the CHKDSK with the desired command line switches.
<InstallGP> Install Group Policy in Windows Home versions.

↑Back to the section index


Windows Troubleshooters
<AeroEffectsTroubleshooter>Troubleshoot problems displaying Aero effects such as transparency.
<AppCompatibilityTroubleshooter>Troubleshoot applications not running properly in recent Windows versions.
<AudioPlaybackTroubleshooter> Troubleshoot problems playing sounds and other audio files.
<AudioRecordingTroubleshooter> Troubleshoot problems recording audio from a microphone or other input source.
<DeviceTroubleshooter> Troubleshoot problems using hardware and access devices connected to the computer.
<DirectAccessTroubleshooter> Troubleshoot problems connecting to a workplace network using DirectAccess.
<FileShareTroubleshooter> Troubleshoot problems accessing shared files and folders over the network.
<HomeGroupTroubleshooter> Troubleshoot problems viewing computers or shared files in a homegroup.
<IEPerformanceTroubleshooter> Troubleshoot problems related to Internet Explorer's performance.
<IESecurityTroubleshooter>Troubleshoot related to Internet Explorer's security.
<InstallUninstallTroubleshooter>Troubleshoot problems installing or uninstalling applications.
<InternetConnectionTroubleshooter>Troubleshoot problems connecting to the Internet or to a specific website.
<KeyboardTroubleshooter> Troubleshoot keyboard related issues.
<MaintenanceTroubleshooter> Troubleshoot ad help performing maintenance tasks.
<NetworkAdapterTroubleshooter> Troubleshoot roblems with Ethernet, wireless, or other network adapters.
<NetworkInboundTroubleshooter> Troubleshoot roblems with Ethernet, wireless, or other network adapters.
<PerformanceTroubleshooter> Adjust settings to improve operating system speed and performance.
<PowerTroubleshooter> Adjust power settings to improve battery life and reduce power consumption.
<PrinterTroubleshooter> Troubleshoot problems printing or managing the printer queue.
<SearchTroubleshooter> Troubleshoot problems with search and indexing using Windows Search.
<ShowHideUpdatesTroubleshooter> Allows users to view hidden updates,and hide or unhide some of them.
<StartMenutroubleshooter> Troubleshoot problems related to the Start Menu and Cortana.
<WindowsStoreAppsTroubleshooter> Troubleshoot problems with apps from the Windows Store.
<WindowsUpdateTroubleshooter> Troubleshoot problems that prevent Windows Update from performing update tasks.
<WindowsUpdateWebTroubleshooter> Troubleshoot problems concerning the Windows autoamtic updates and related services.
<WMPSettingsTroubleshooter> Helps the user reset Windows Media Player settings to the default configuration.
<WMPDVDPlayingTroubleshooter> Troubleshoot problems playing a DVD using Windows Media Player.
<WMPLibraryTroubleshooter> Troubleshoot problems with adding media files to the Windows Media Player library.

↑Back to the section index


Post-repair actions
<RestartWindowsShell>Save all Windows Shell settings, and then restart the File Explorer process.
<SendReports>Send the reports to your email address or FTP server.
<Reboot>Reboot the computer after running the current script.
<Shutdown>Shutdown the computer instead of restarting it.
<RebootSafeMode> Reboot the pc in safe mode after running the script.
<UninstallMBAM> Uninstall Malwarebytes AntiMalware, if it has been previously installed in this PC.
<UninstallSAS> Uninstall Super AntiSpyware, if it has been previously installed in this PC.
<UninstallRogueKiller> Uninstall RogueKiller, if it has been previously installed in this PC.
<Beep> Play a sound or beep. You can specify the number of times to beep after the command.
<RestoreDesktopIcons> Restore the layout of the desktop icons.
<MultipleRebootScheduler> Launch our new MRS tool, which allows you to reboot several times in sequence.
<AccountProfileFixer> Launch our APF tool, wich allows you to easily repair corrupted user profiles
<StopResettingMyApps> Launch our new SRMA tool, wich allows you to prevent the file associations from being automatically reset.

↑Back to the section index


<Sleep> Pause the script for a given number of seconds
->WaitWindow() Pause the script execution until the specified window exists and is visible.
->WaitWindow2() Wait for a specific window, and add it to the managed windows list.
->WaitWindowState() Wait until a window is on the specified state(s).
->WaitControl() Wait until a specific control is visible and enabled.
->WaitControlState() Pause script execution until a specific control has the specified state.
->WaitControlState2() Wait until a specific control has the specified state
->ClickControl() Click a specific control in a window.
->ClickControlAt() Click a control at a specific position, relative to the parent's client area.
->WaitControlAt() Wait for a control to be visible at a specific position, and optionally with a specific class name.
->ClickWindowPos() Simmulate a mouse click at the specified position within a window.
->ControlSend() Send keystrokes to a specific control in a window.
->WinSend() Send text to a window.
->SendText() Send text to a control or a window.
->Sleep() Pause the script execution for the specified time.
->CloseWindow() Close a specific managed window.
->CloseProcess() Terminate the process created by the last <Run> command.
->WaitWindowClose() Pause the script execution until the specified window(s) close.
->WaitProcessClose() Wait until a process closes.


See also:

Automation examples

UVK's application automation

Special Window title/text definition

Control CLASSNN special definition

Managed Windows list


↑Back to the section index


Copyright Carifred © 2010 - 2023, all rights reserved.

Scroll to top