summary refs log tree commit diff
path: root/deploy/installer/cleanup/installscript.qs
blob: 46f8012cc34afbcbd854db76dcb69b7dea16bec9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function Component()
{
}

Component.prototype.createOperations = function()
{
    component.createOperations();

    try
    {
        if( installer.value("os") === "win" )
        {
            /**
             * Cleanup AppData and registry
             */
            component.addElevatedOperation("Execute","UNDOEXECUTE","cmd /C reg delete HKEY_CURRENT_USER\Software\nheko\nheko /f");
            var localappdata = installer.environmentVariable("LOCALAPPDATA");
            if( localappdata != "" )
            {
                component.addElevatedOperation("Execute","UNDOEXECUTE","cmd /C rmdir "+localappdata+"\nheko /f");
            }
        }
    }
    catch( e )
    {
        print( e );
    }
}