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.
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.

↑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.

↑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> Repairs the issue of Windows taking too long to connect to a saved Wifi network.

↑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
<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.

↑Back to the section index

 

Maintenance actions
<SmartUninstaller> Launch the Smart Uninstaller in a separate instance.
<EmptyTempFolders> Empty the temporary folders. This command doesn't empty the recycle bin.
<CleanAllUsersTemp> Empty the temporary folders for all users, also empties the recycle bin.
<EmptyBrowsersCache> Empty the cache for all the installed internet browsers.
<DeleteBrowsersCookies> Delete the cookies for all the installed internet browsers.
<ClearIEHistory> Clear the Internet Explorer's history for the current user.
<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.
<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.
<CleanupRecentList> Cleanup references to recently accessed\r\n items.
<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.

↑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.
<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.
<CleanupWinSxS>Free up HDD space by removing files from previous Windows versions.
<StartMenuTroubleshooter>Download and execute the Start Menu Troubleshooter.
<StoreAppsTroubleshooter>Download and execute the Windows Store Apps Troubleshooter.
<WindowsUpdateTroubleshooter>Download and execute the Windows Update Troubleshooter.

↑Back to the section index

 

Post-repair actions
<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.
<RestoreDesktopIcons> Restore the layout of the desktop icons.
<MultipleRebootScheduler> Launch our new MRS tool, which allows you to reboot several times in sequence.

↑Back to the section index

 

Automation
->WaitControl() Wait until a specific control is visible and enabled.
->WaitControlState() Pause script execution until a specific control has the specified state.
->ClickControl() Click a specific control in a window.
->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.
->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() Pause the script execution until the process created by the last <Run> command ends.

 

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

 

Matched content by Google

Copyright Carifred © 2010 - 2018, all rights reserved.