FOG Snapin Does not Finish



  • CentOS Linux 7.7.1908
    FOG 1.5.6

    Have not had issues running a .exe before but for some reason this one will not tell FOG its done. The .exe runs and reboots apart of the install on a delay of 5mins. It installs and reboots but FOG never gets the message it completed then it runs the install again and reboots and loops.

    Do I need to set this as a Snapin Pack and run with a script? Or do I use the Snapin Timeout feature (Never used it before and not much info on it in Wiki)



  • @UWPVIOLATOR If you can’t get the application to behave with respect to the restarts, you could always create a snapin pack bundling the executable with a script. In the script, you could check to see if the application was already installed and of the correct version, then if it wasn’t perform the install. if you wanted to kick off the application and then do something like loop while the executable was running, you might want to play with the start command, something like start "" installer.exe -args. https://ss64.com/nt/start.html

    @george1421 the /k flag runs the specified command then leaves the command window open. https://ss64.com/nt/cmd.html


  • Moderator

    @UWPVIOLATOR (this is said off the top of my head since I’m lazy at the moment). Typically you would launch a batch file via an application deployment tool with cmd.exe /c batch.cmd I believe if you use the cmd.exe /k batch.cmd it will do as you ask. I don’t have any windows machines at home to test against. But you might want to look up what the /k switch does. I know the /c switch is common.



  • @Tom-Elliott @george1421 I have someone from Zen support looking at it now. But I am going to assume they find the same issue and tell me to deal with it but we will see. Is there a way to run a .exe then keep going with the .bat? If I can do that then I can make this work.



  • @Tom-Elliott The log part never worked. I dont think you can make your own log location by the looks of it. I agree with -U it is not needed. The issue I think I have now is 1 the installer is not listening to the augments and 2 because its not listening to augments to goes ahead and reboots before finishing the .bat script and doesnt tell FOG it done.


  • Senior Developer

    @UWPVIOLATOR I’m suspecting, possibly, the Unininstall of the old agent (if it is indeed installed on the machine) may be causing it.

    Looking at the installer information, the items @george1421 selected should do the trick.

    ZenAgentUpdater.x64.17.4.exe -q -x -Z c:\windows\temp\zen.log -U

    Though I might shorten it out to:

    ZenAgentUpdater.x64.17.4.exe -xqZ > c:\windows\temp\zen.log

    First, I’ve removed the -U as this seems to be the potential “issue”. I’d hope that an installer of this type would have the ability to upgrade over install autonomously. I suspect adding the -U causes the prior package to uninstall, causing the prompt which then never returns the error code. Next, the -xq basically just says no reboot and quiet install (unless these 2 arguments cannot be used together?) the -Z just enables logging, though I’m not sure where the log file goes. Any output from the command will then be redirected to C:\windows\temp\zen.log

    Rather than having multiple switches, I grouped them together as some times I’ve seen multiple switches may pass as overwriting the prior switches. If this doesn’t work, feel free to seperate the arguments.

    Hopefully this helps, and if not, maybe it gives us a better clue as to what’s happening?


  • Moderator

    @UWPVIOLATOR So the question is, what is the exit code provided by the application? 1603, 1604?



  • @george1421 Sorry for long response time. So here is what happens. Run the cmd manually it will run and install but still ask for reboot thus I cant get the echo Exit Code is %errorlevel%. Run the came cmd with FOG it force reboots but doesn’t tell FOG it completed thus it loops installing over and over.


  • Senior Developer

    @george1421 -s is usually used for silent


  • Moderator

    @UWPVIOLATOR That right there is your problem. That pop-up. When deployed by FOG and running as SYSTEM its displayed on the hidden desktop.

    Since the zenworks help information mentions extraction. If you extract the files to a directory can you get to the MSI file? The MSI might be wrapped in a .exe file. It may be the .exe file that is displaying that message if you can’t find a command line switch to suppress it.

    (from your deleted post) I said I guessed at the command line. I’m not sure those were the correct switches to use. I would think the -q should be quiet and not display anything.



  • @george1421 Its this. Even when running quietly it still pops this up.

    mRemoteNG_EZb9W7CXjk.png



  • This post is deleted!

  • Moderator

    @UWPVIOLATOR So what does your command line look like that calls this installer?

    If you run that same command from an elevated command prompt what happens? Does the software upgrade correctly? Does it exit correctly without any popups?

    Again this is for debugging, if you wrap the .exe in a cmd file and run from an elevated command prompt what exit code is returned.

    ZenAgentUpdater.x64.17.4.exe -q -x -Z c:\windows\temp\zen.log -U
    echo Exit Code is %errorlevel%
    

    I guess on most of the command line for the zen agent update. So don’t quote me on it.



  • @Sebastian-Roth Its Zenworks 17.4 Agent Updater. Its custom to our environment so not expecting others to have it. I just have never had a plain .exe run and FOG not record it as complete.

    Usage: ZenAgentUpdater.x64.17.4.exe <options>
    
        BUILDTIME <options> are:
          -f <file>    =  add <file> to extractor
          -o <outf>    =  create extractor named <outf>
                          (default is wrapped.exe)
    
        RUNTIME <options> are:
          -l           =  list contents only (do not extract)
          -n           =  no command execution (extract only)
          -x           =  suppress reboot command passed to ZENPreAgent(Manual Reboot)
          -q           =  show no reboot prompt(quiet install)
          -m           =  have a rebootless agent with limited agent if opting for silent install(-q)
          -Z           =  log ZESM setup.exe installation
          -U           =  force uninstall previous ZENworks Desktop Management agent
          -k <registration key> =  register with the specified registration key after install
          -c <file>    =  custom standalone install file
          -d <dest>    =  extract files to <dest>
                          (default is C:\Windows\novell\zenworks\stage\)
          -A <file>    =  read arguments from file
          -b <component>    =  block installation of component."component" can be a single component or a comma separated list of ZENworks components
                               Supported component names:fde,zesm,asset,policies,bundles,patch,users,imaging
          -K <flags>    =  pass flags to install drivers for component."component" flags need to be passed for ZESM,FDE,FLA,ASD in the given order.Pass 1 to enable drivers and 0 to disable driver installation for the corresponding component
                           For example passing 1110 meaning install drivers for ZESM,ZFDE and FLA but skip driver installation for ASD.
    
        OTHER <options> are:
          -v           =  be verbose
          -h           =  help (show this message)
    
    hit any key to continue
    
    

  • Senior Developer

    @UWPVIOLATOR said in FOG Snapin Does not Finish:

    Have not had issues running a .exe before but for some reason this one …

    Which one is this exactly. Posting more details you might find people who had the same thing with “this”…



  • The install is finishing. I might try the quite switch. But if I just do it with a script FOG completes the task once the script runs I believe. The only issue then is it will keep trying to delete the .exe as it thinks its done but it will be locked.


  • Moderator

    The .exe needs to return a specific error code to signal that it completed successfully. Typically that is error code 0. There are a few others that show a successful install that I don’t know off the top of my head. If the error code is not returned the installer will wait forever. I don’t personally use FOG, but the app deployment tool I use, does wait for the error/exit level.

    Are you sure the .exe installer is completing fully and disappearing from the task list? If you manually run that installer from the desktop gui does it complete correctly or is there a pop-up asking a question?


Log in to reply
 

394
Online

7.4k
Users

14.5k
Topics

136.5k
Posts