Creating snapin for.msi driver installer



  • I have tried creating basic snapin in run a printer driver installer (http://dymo-labelmanager-pc-ii.drivers.informer.com/download/14728)
    Although these drivers could be installed as a driver pack (it seems to need more than just the .inf though, so it seems complex to me)
    Can it be run with a snapin? If so can someone please help me to set it up?
    I tried as per the screenshot, first I tried to include the driver with the snapin, it said it was running the snapin on the client but nothing happend. Then I tried with the switches shown in the screenshot as per msi section here: https://wiki.fogproject.org/wiki/index.php/Managing_FOG#Snap-ins

    I also tried to create a new snapin just like the screen shot but without uploading the file but the snapin page always stopped responding, I couldnt even access fog with another webpage at that time, it seemed to lock up the server somehow.

    0_1452044390043_snapin printer.png



  • @Jbob ah ok. I’m slowly figuring out how this works.
    Solved and Thanks !


  • Senior Developer

    Well then you need to supply those silent arguments. It seems like its ‘crashing’ because its running the exe, which is spawning a gui to the SYSTEM account and waiting for input. Post windows xp, you cannot see a SYSTEM gui. You need to make the snapin perform silently.



  • @Jbob No its not, but I am just trying to get the exe to run. There are arguments to make it silent but I’m just trying to get it working first


  • Senior Developer

    @Rusty is wordview_en-us.exe a silent installation by default? Most exe’s will launch a user interface when run. You may need to supply some Args to make it a silent install



  • Some more strange behaviour before and after reboots… This seems to keep repeating itself
    After a reboot, fog.log shows:

    ------------------------------------------------------------------------------
    ---------------------------------SnapinClient---------------------------------
    ------------------------------------------------------------------------------
     1/12/2016 12:49 PM Client-Info Version: 0.9.10
     1/12/2016 12:49 PM SnapinClient Running...
     1/12/2016 12:49 PM Middleware::Communication URL: http://10.0.0.51/fog/service/servicemodule-active.php?moduleid=snapinclient&mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/12/2016 12:49 PM Middleware::Communication Response: Success
     1/12/2016 12:49 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/12/2016 12:49 PM Middleware::Communication Response: Success
     1/12/2016 12:49 PM SnapinClient Snapin Found:
     1/12/2016 12:49 PM SnapinClient     ID: 32
     1/12/2016 12:49 PM SnapinClient     RunWith: 
     1/12/2016 12:49 PM SnapinClient     RunWithArgs: 
     1/12/2016 12:49 PM SnapinClient     Name: Word Viewer
     1/12/2016 12:49 PM SnapinClient     File: wordview_en-us.exe
     1/12/2016 12:49 PM SnapinClient     Created: 2016-01-12 01:29:29
     1/12/2016 12:49 PM SnapinClient     Args: 
     1/12/2016 12:49 PM SnapinClient     Reboot: 0
     1/12/2016 12:49 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.file.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=32
     1/12/2016 12:50 PM Bus {
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Word Viewer\",\r\n  \"message\": \"FOG is installing Word Viewer\",\r\n  \"duration\": 10\r\n}"
    }
     1/12/2016 12:50 PM Bus Emmiting message on channel: Notification
     1/12/2016 12:50 PM SnapinClient Starting snapin...
     1/12/2016 12:50 PM Bus Registering ParseBus in channel Power
     1/12/2016 12:50 PM Bus Became bus client
     1/12/2016 12:50 PM Bus Registering OnNotification in channel Notification
     1/12/2016 12:50 PM Bus Registering OnUpdate in channel Update   "<<<<<--- GETS STUCK HERE ---<<<<<<<<<"
     1/12/2016 12:56 PM Bus Became bus server                                      "<<<<<--- AFTER REBOOT ---<<<<<<<<<"
     1/12/2016 12:56 PM Bus {
      "channel": "Status",
      "data": "{\r\n  \"action\": \"load\"\r\n}"
    }
     1/12/2016 12:56 PM Bus Emmiting message on channel: Status
    


  • @Jbob I removed “run with” for word viewer snapin and re ran it. Now it seems to crash…

    
    ------------------------------------------------------------------------------
    ---------------------------------SnapinClient---------------------------------
    ------------------------------------------------------------------------------
     1/12/2016 12:30 PM Client-Info Version: 0.9.10
     1/12/2016 12:30 PM SnapinClient Running...
     1/12/2016 12:30 PM Middleware::Communication URL: http://10.0.0.51/fog/service/servicemodule-active.php?moduleid=snapinclient&mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/12/2016 12:30 PM Middleware::Communication Response: Success
     1/12/2016 12:30 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/12/2016 12:30 PM Middleware::Communication Response: Success
     1/12/2016 12:30 PM SnapinClient Snapin Found:
     1/12/2016 12:30 PM SnapinClient     ID: 32
     1/12/2016 12:30 PM SnapinClient     RunWith: 
     1/12/2016 12:30 PM SnapinClient     RunWithArgs: 
     1/12/2016 12:30 PM SnapinClient     Name: Word Viewer
     1/12/2016 12:30 PM SnapinClient     File: wordview_en-us.exe
     1/12/2016 12:30 PM SnapinClient     Created: 2016-01-12 01:29:29
     1/12/2016 12:30 PM SnapinClient     Args: 
     1/12/2016 12:30 PM SnapinClient     Reboot: 0
     1/12/2016 12:30 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.file.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=32
     1/12/2016 12:30 PM Bus {
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Word Viewer\",\r\n  \"message\": \"FOG is installing Word Viewer\",\r\n  \"duration\": 10\r\n}"
    }
     1/12/2016 12:30 PM Bus Emmiting message on channel: Notification
     1/12/2016 12:30 PM Bus Emmiting message on channel: Notification
     1/12/2016 12:30 PM SnapinClient Starting snapin...
    

    And just seems stuck there…
    Even after 15 minutes there are no more additions the fog.log

    FOG says the task is still “In Progress”

    0_1452563247260_fog snapin stuck.png



  • @Kiweegie Thanks. I checked the /opt/fog/snapins directory and they had been deleted somewhow. How is this even possible?

    @Jbob Thanks!


  • Senior Developer

    @Rusty RunWith should be blank if you just want to run the uploaded file.



  • @Rusty Hi Rusty for the host to which the snapin is not being deployed make sure it has an image associated with it and try redeploying. Thats another of the gotchas I’ve found.

    Re the missing snapins, have you checked the server to see if the files exist at /opt/fog/snapins?

    If not then just use the GUI to update the snapin and upload the file again.

    regards Kiweegie.



  • I managed to get that particular snapin working. I have since been trying to get some .exe installers working (word viewer and the file format converters) without any luck.

    After messing around with the snapins, I have somehow deleted the files in the /opt/fog/snapins/ directory ! Should this be possible? The snapins still exist and refer to the files but when I click on the link to add a file it no longer contains the .exe file (as per the fog/snapins/ directory)
    All I really did was uncheck replicate option and mess with storage group settings.

    Oh and I still can’t get these exe snapins to install.

    Here is the log excerpt:

    ---------------------------------SnapinClient---------------------------------
    ------------------------------------------------------------------------------
     1/11/2016 6:10 PM Client-Info Version: 0.9.10
     1/11/2016 6:10 PM SnapinClient Running...
     1/11/2016 6:10 PM Middleware::Communication URL: http://10.0.0.51/fog/service/servicemodule-active.php?moduleid=snapinclient&mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:10 PM Middleware::Communication Response: Success
     1/11/2016 6:10 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:10 PM Middleware::Communication Response: Success
     1/11/2016 6:10 PM SnapinClient Snapin Found:
     1/11/2016 6:10 PM SnapinClient     ID: 30
     1/11/2016 6:10 PM SnapinClient     RunWith: wordview_en-us.exe
     1/11/2016 6:10 PM SnapinClient     RunWithArgs: 
     1/11/2016 6:10 PM SnapinClient     Name: Word Viewer
     1/11/2016 6:10 PM SnapinClient     File: wordview_en-us.exe
     1/11/2016 6:10 PM SnapinClient     Created: 2016-01-11 07:09:11
     1/11/2016 6:10 PM SnapinClient     Args: 
     1/11/2016 6:10 PM SnapinClient     Reboot: 0
     1/11/2016 6:10 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.file.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=30
     1/11/2016 6:10 PM Bus {
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Word Viewer\",\r\n  \"message\": \"FOG is installing Word Viewer\",\r\n  \"duration\": 10\r\n}"
    }
     1/11/2016 6:10 PM Bus Emmiting message on channel: Notification
     1/11/2016 6:10 PM SnapinClient Starting snapin...
     1/11/2016 6:10 PM SnapinClient ERROR: Could not start snapin
     1/11/2016 6:10 PM SnapinClient ERROR: The system cannot find the file specified
     1/11/2016 6:10 PM Bus Emmiting message on channel: Notification
     1/11/2016 6:10 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?taskid=30&exitcode=-1&mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:10 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:10 PM Middleware::Communication Response: No snapins
    ------------------------------------------------------------------------------
    

    I created a test.bat file:

    echo test
    pause
    

    and this snapin does not deploy either. Log:

    ------------------------------------------------------------------------------
    ---------------------------------SnapinClient---------------------------------
    ------------------------------------------------------------------------------
     1/11/2016 6:22 PM Client-Info Version: 0.9.10
     1/11/2016 6:22 PM SnapinClient Running...
     1/11/2016 6:22 PM Middleware::Communication URL: http://10.0.0.51/fog/service/servicemodule-active.php?moduleid=snapinclient&mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:22 PM Middleware::Communication Response: Success
     1/11/2016 6:22 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:22 PM Middleware::Communication Response: Success
     1/11/2016 6:22 PM SnapinClient Snapin Found:
     1/11/2016 6:22 PM SnapinClient     ID: 31
     1/11/2016 6:22 PM SnapinClient     RunWith: test.bat
     1/11/2016 6:22 PM SnapinClient     RunWithArgs: 
     1/11/2016 6:22 PM SnapinClient     Name: tester
     1/11/2016 6:22 PM SnapinClient     File: test.bat
     1/11/2016 6:22 PM SnapinClient     Created: 2016-01-11 07:20:48
     1/11/2016 6:22 PM SnapinClient     Args: 
     1/11/2016 6:22 PM SnapinClient     Reboot: 0
     1/11/2016 6:22 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.file.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=31
     1/11/2016 6:22 PM Bus {
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"tester\",\r\n  \"message\": \"FOG is installing tester\",\r\n  \"duration\": 10\r\n}"
    }
     1/11/2016 6:22 PM Bus Emmiting message on channel: Notification
     1/11/2016 6:22 PM SnapinClient Starting snapin...
     1/11/2016 6:22 PM SnapinClient ERROR: Could not start snapin
     1/11/2016 6:22 PM SnapinClient ERROR: The system cannot find the file specified
     1/11/2016 6:22 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?taskid=31&exitcode=-1&mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:22 PM Middleware::Communication URL: http://10.0.0.51/fog/service/snapins.checkin.php?mac=00:26:5E:DE:6C:4B|00:22:FB:A0:33:B0|00:21:70:F5:CC:AF||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService=1
     1/11/2016 6:22 PM Middleware::Communication Response: No snapins
    ------------------------------------------------------------------------------
    

    Please help, this is driving me crazy :)



  • @Jbob ah nice one - not aware of that, thanks for the heads up.

    regards Kiweegie


  • Senior Developer

    @Kiweegie you only actually need msiexec because its included in PATH.



  • @Rusty Hi Rusty

    amend Snapin Run With field to

    c:\windows\system32\msiexec.exe
    

    Update and try deploying again,

    cheers, Kiweegie


  • Senior Developer

    See https://forums.fogproject.org/topic/6414/snapin-questions for how to run an msi using snapins.


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.