Jump to content

Recommended Posts

Posted (edited)

i run this and unexpectedly it restarts before it should..heres the section

if $install_t1 = 1 then 
            modLog("install", "Event", "Call installBES102() for BESX 400/401")
            installBES102()
            IniWrite("autoSIP_module_BES_temp.tmp", "STAGE", "installStage", 2)
            modLog("install", "Event", "Done 1st phase of install for BESX 400/401")
            $install_t1 = IniRead("autoSIP_module_BES_temp.tmp", "STAGE", "installStage", 2)
        endif
        if $install_t1 = 2 then
            modLog("install", "Event", "Call 2nd phase of install for BESX 400/401")
            install201()
            modLog("install", "Event", "Done 2nd phase of install for BESX 400/401")
   ;elseif $install_t1 = 3 then output DOne this function
        endif

FUNC install201()
    modLog("install201", "Event", "Turn autoLogon ON")
;Set autologin on
    auto_login(1)
;Add module to runonce
    modLog("install201", "Event", "Add module to RunOnce")
    RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce", "Launch autoSIP", "REG_SZ", $scriptPath & "\autoSIP_module_BES_xLaunch.bat")
    modLog("install201", "Event", "All install stages complete - Restart")
    IniWrite("autoSIP_module_BES_temp.tmp", "STAGE", "installStage", 3)
;Restart system
    Shutdown(2) 
    exit
ENDFUNC

it should restart at the bottom where it says shutdown....but it restarts right after finishing installBES102()..theres no shutdown in that function. Thanks for the insight :lmao:

EDIT: yes it does go through the first if statement because $install_t1 is set to 1 innitially.

Edited by ennis

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...