Search This Blog

Wednesday, October 17, 2018


This one will be familiar to every IT pro that has ever had to deploy something through Group Policy, when you dont have SCCM and have it only apply once, instead of at every start.

Here is a solution:

#cs ----------------------------------------------------------------------------

 AutoIt Version:
 Author:   Alex Belenkiy © 2018
 Created:   09/21/2018
 Last Update:  09/24/2018

 Script Function:
 Run an install or a program only once
  To execute run as follows:
   RunOnce.exe "\\server\share\folder\file.exe" "/i /qn" "c:\program Files\RunOnce\test.txt"
    RunOnce.exe "\\server\share\folder\file.exe" - "c:\program Files\RunOnce\test.txt"
#ce ----------------------------------------------------------------------------

if $CmdLine[0] <> 3 then Exit
$CommandFile = $CmdLine[1]
$Switches = $CmdLine[2]
if $Switches = "-" then $Switches = ""
$FlagFile = $CmdLine[3]
if FileExists ($FlagFile) then Exit
$a = RunWait(@ComSpec & " /c " & $CommandFile & " " & $Switches, @SystemDir, @SW_HIDE)
if @error then Exit

$File = FileOpen ($FlagFile, 10)
if @error then Exit
FileWriteLine($File,"RunOnce Executed")

If the file named by the third variable exists when the runonce.exe executes, the program will just exit. If the file does not exist, the first variable will be executed along with the switches passed in the second variable. Use a - for the second variable to specify no switches. Once the execution has completed, the file in the third variable will be created.

Enjoy and modify as needed :)

Friday, September 7, 2018

Chrome missing recently visited tiles

I have come across a strange issue with Chrome suddenly missing recently visited sites.

The issue can be resolved by typing the following into the address bar:

Find the #use-google-local-ntp flag and enable it. Hit RELAUNCH NOW.

The tiles should be back now.

Came across this on REDDIT 

Wednesday, February 22, 2017

Dual boot Windows and Linux time offset

Good day,

long time no post.
I have come across an interesting fix for an annoying problem.

If you dual boot Linux and Windows, every time you go into Windows after Linux, the time is wrong.
This is due to Linux using GMT while Windows trying to get the local time.

Fix: create the following DWORD value under HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
RealTimeIsUniversal and set it to 1
Reboot and problem solved.


Hopefully this helps someone.

Tuesday, May 6, 2014

Citrix Receiver 13 on Ubuntu 14.04

Long time no post...

I have just come across something awesome that actually works:

Was able to install the latest Citrix client on a kubuntu 14.04 system without a hiccup.


Wednesday, May 30, 2012

Symantec NetBackup 7 console opening delay fixed

If you are a user of Symantec NetBackup, i am sure you have experienced the long delay before opening the application after upgrading from 6.x to 7.x
To fix the issue just run the following on the master server:

Friday, March 12, 2010

Blackberry DB Backup BESMgmt BlackberryDBBackup.exe

Ok, so if anyone is interested in backing up the MSDE database for the Blackberry Enterprise Server, you may have come across a command called blackberrydbbackup.exe. And you most likely would have run into issues with using it. The help when executing the program without switches shows a command -d for specifying the database, -E for using windows credentials, and -f for the backup folder: blackberrydbbackup.exe -d BESMgmt -E -f c:\backup That does not work, no matter what you seem to do. Even though Blackberry support and all forums show it as being the proper command sequence. Well after a half hour of hitting my head against the wall, a solution was born. blackberrydbbackup -dBESMgmt -E -f c:\backup Note the no space after the -d and the .exe taken out. When the script was written, it seems someone made a few mistakes. The .exe extension is taken as a part of the switch it seems. And the help needs to be modified to reflect the -ddbname. Dont even bother using -U and -P for username and password. Nothing i tried worked. -Udomain\besadmin -Udomain\BESAdmin -U domain\besadmin -U domain\BESAdmin -Ubesadmin -UBESAdmin -U BESAdmin -U besadmin -UBESAdmin@domain -U BESAdmin@domain -U: all of the above and the same for -P ofcourse. When scheduling the script for this using Windows Scheduler, -E is enough as the windows credentials will be passed. Just enter the besadmin info when saving the job. Someone posted online about using the AT command to run as a system service along with -U and -P so as to not have to change the password for the job each time the Besadmin pw changed. That makes no difference as even if you got the -U and -P to work properly, when the besadmin pw is changed you would still have to modify the script with the new -P. By the way the tool along with blackberrydbrestore.exe is located in the tools folder on the Blackberry cd. Thank you Alex B

Friday, October 9, 2009

OLKAway Now With Vista support

Long overdue update.

Added Vista support, removed old AutoIT declarations, and set the temp folder to be recreated after deletion to avoid random errors.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    This script will delete the Outlook temp folder under
    c:\documents and settings\%username%\local settings\temporary internet files\OLKxxx (Windows XP/2000)
    C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook (Windows Vista)
    It will check for the presense of the OutlookSecureTempFolder entry in the registry
    starting with Outlook 2007, all the way to Outlook 2000 working backwards.
    Once found, it will delete the contents.
    /install option will add a shortcut to the startup folder.
    /uninstall option will delete the shortcut.
    no option will just execute the removal without installing.
    created 01/07/2008
    updates 10/09/2009
        Added Vista support
        Removed old AutoIT declarations
        Corrected random Outlook issues due to the temp folder not being recreated, by creating it manually after each delete.
dim $InstallPath
$InstallPath = "C:\Program Files\NYITSupport\OLKaway\"
    case @OSVersion = "WIN_VISTA"
        Call ("StartSequence")
    case @OSVersion = "WIN_XP"
        Call ("StartSequence")
    case @OSVersion = "WIN_2000"
        $ver = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions", "ProductType")
        If $ver = "ServerNT" then Exit
        Call ("StartSequence")
    case Else
Func StartSequence()
    if $CmdLine[$CmdLine[0]] = "" then 
        call ("CleanUp")
            case $CmdLine [1] = "/uninstall"
                if not IsAdmin() then Exit
                call ("Uninstall")
            case $CmdLine [1] = "/install" 
                if not IsAdmin() then Exit
                if FileExists($InstallPath) then Exit
                Call ("Install")
            case Else
func CleanUp()
    $OSTF = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security", "OutlookSecureTempFolder") ; Outlook 2007
    if @error then $OSTF = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security\", "OutlookSecureTempFolder") ; Outlook 2003
    if @error then $OSTF = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security", "OutlookSecureTempFolder") ; Outlook XP
    if @error then $OSTF = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security", "OutlookSecureTempFolder") ; Outlook 2000
Func Install()
    FileCopy (@ScriptFullPath, $InstallPath,8)
    ShellExecute("cacls.exe", '"' & StringLeft($InstallPath, StringLen($InstallPath)-1) & '" /e /c /g BUILTIN\Users:F')
    FileCreateShortcut($InstallPath &; "OLKaway.exe", @StartupCommonDir & "\NYITSUPPORT OLKaway.lnk", $InstallPath, "", "NYITSUPPORT OLKaway")
    call ("CleanUp")
Func Uninstall()
    FileDelete (@StartupCommonDir &; "\NYITSUPPORT OLKaway.lnk")

Tuesday, July 14, 2009

WSUS Problems On Cloned Machines

I ran into an interesting issue the other day. A machine registered in WSUS would appear and then dissapear from the WSUS 3 SP1 console.

Found the solution to the problem on the following links: – best source

Here is a script that will run only once if completed successfully. It will also write a log in either case to a subfolder where it ran from with a computer name in the file name.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
        This application will repair WSUS issues that may have been caused by the machine being imaged.
        Referrenced from:
    Alex Belenkiy
If Not IsAdmin() then Exit ; check for admin rights
if @OSVersion <> "WIN_XP" then Exit ; Only install on Windows XP
if FileExists("c:\windows\WSUS\WSUSFixComplete.txt") then Exit
dim $error, $File, $log, $logText
$command = RunWait(@ComSpec & " /c " & "net stop wuauserv")
if @error then 
    call("Logger", "net stop wuauserv FAILED")
    $error = 1
    call("Logger", "net stop wuauserv SUCCESSFUL")
Call("RegFix", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "AccountDomainSid") 
Call("RegFix", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "PingID") 
Call("RegFix", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "SusClientId") 
Call("RegFix", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update", "LastWaitTimeout")
Call("RegFix", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update", "DetectionStartTime")
Call("RegFix", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update", "NextDetectionTime")
Call("RegFix", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update", "AUState")
$command = RunWait(@ComSpec & " /c " & "net start wuauserv")
if @error then 
    call("Logger", "net start wuauserv FAILED")
    $error = 1
    call("Logger", "net start wuauserv SUCCESSFUL")
$command = RunWait(@ComSpec & " /c " & "wuauclt /resetauthorization /detectnow")
if @error then 
    call("Logger", "wuauclt /resetauthorization /detectnow FAILED")
    $error = 1
    call("Logger", "wuauclt /resetauthorization /detectnow SUCCESSFUL")
if $error <> 1 then ; install completed successfully don't run again.
    $File = FileOpen("c:\windows\WSUS\WSUSFixComplete.txt",9)
    call ("Logger", "WSUS Fix completed successfully")
Else ; install did not complete successfully, write a log and allow for another try
    call ("Logger", "WSUS Fix encountered errors. Will try again at next startup.")
Func Logger($logText) ; write a log
    $log = FileOpen(@ScriptDir & "\Logs\" & @ComputerName & ".log", 9)
    if not @error Then
        FileWriteLine($log, @CRLF & $logText & " - " & @MON & "/" & @MDAY & "/" & @YEAR & " - " & @HOUR & ":" & @MIN)
Func RegFix($RegKey, $RegVal)
    $Command = RegRead($RegKey, $RegVal)
    if not @error Then
        call("Logger", "RegRead " & $RegKey & " " & $RegVal & " " & "LOCATED")
        $Command = RegDelete($RegKey, $RegVal)
        if @error then 
            $error = 1
            call("Logger", "RegDelete " & $RegKey & " " & $RegVal & " " & "FAILED")
            call("Logger", "RegDelete " & $RegKey & " " & $RegVal & " " & "SUCCESSFUL")
        call("Logger", "REGREAD " & $RegKey & " " & $RegVal & " " & "NOT FOUND")