Snapins batch based are not working propperly when $ in path



  • Hi,

    i found out that snapins based on batch files does not work propperly when using unc paths that contain a dollar $.
    When using the same batch with an unc path without the $ everything is working fine.

    Little example:

    Not working

    @echo off
    cscript \\vs-ha-backup\install$\MSOffice\Office365\2003kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\vs-ha-backup\install$\MSOffice\Office365\2007kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\vs-ha-backup\install$\MSOffice\Office365\2010kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\vs-ha-backup\install$\MSOffice\Office365\2013kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\vs-ha-backup\install$\MSOffice\Office365\2016kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\vs-ha-backup\install$\MSOffice\Office365\2013_2016c2r.vbs All /Q /NoCancel /BYPASS 1
    \\vs-ha-backup\install$\MSOffice\Office365\setup.exe /configure \\vs-ha-backup\install$\MSOffice\Office365\proplus.xml
    EXIT
    

    Working

    @echo off
    cscript \\it4005\install\Office365\2003kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\it4005\install\Office365\2007kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\it4005\install\Office365\2010kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\it4005\install\Office365\2013kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\it4005\install\Office365\2016kill.vbs All /Q /NoCancel /BYPASS 1
    cscript \\it4005\install\Office365\2013_2016c2r.vbs All /Q /NoCancel /BYPASS 1
    \\it4005\install\Office365\setup.exe /configure \\it4005\install\Office365\proplus.xml
    EXIT
    

    Could that be fixed please?

    Regards X23



  • @Quazz Hi, thank you i could fix the problem it was really an access problem, right for everyone was missing, i broke the share and inherited everyone for only that folder and now it works. Great :)


  • Moderator

    @x23piracy Hi, error code 5 is a windows error that means Access denied, so there’s some permission/rights issue somewhere, either on your share (which is likely since it’s a hidden share) or with the account executing it (which is SYSTEM so unlikely)

    If you manually enter \vs-ha-backup\install$\MSOffice\Office365\setup.exe for instance, does it open the file? (do this on a clean system)



  • @Wayne-Workman here are my logs for the presented batch files, the one with $ making problems and the one without $ working:

    With $ dollar:

     19.05.2016 09:43 Middleware::Communication URL: http://fog/fog/management/index.php?sub=requestClientInfo&mac=F4:CE:46:2F:EE:FE||00:00:00:00:00:00:00:E0&newService&json
     19.05.2016 09:43 Middleware::Response Success
     19.05.2016 09:43 Middleware::Communication URL: http://fog/fog/service/getversion.php?clientver&newService&json
     19.05.2016 09:43 Middleware::Communication URL: http://fog/fog/service/getversion.php?newService&json
    
     19.05.2016 09:43 Service Creating user agent cache
     19.05.2016 09:43 Middleware::Response Success
     19.05.2016 09:43 Middleware::Response Success
    
    ------------------------------------------------------------------------------
    ---------------------------------ClientUpdater--------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:43 Client-Info Client Version: 0.10.6
     19.05.2016 09:43 Client-Info Client OS:      Windows
     19.05.2016 09:43 Client-Info Server Version: 7709
     19.05.2016 09:43 Middleware::Response Success
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    ----------------------------------TaskReboot----------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:43 Client-Info Client Version: 0.10.6
     19.05.2016 09:43 Client-Info Client OS:      Windows
     19.05.2016 09:43 Client-Info Server Version: 7709
     19.05.2016 09:43 Middleware::Response Success
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    --------------------------------HostnameChanger-------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:43 Client-Info Client Version: 0.10.6
     19.05.2016 09:43 Client-Info Client OS:      Windows
     19.05.2016 09:43 Client-Info Server Version: 7709
     19.05.2016 09:43 Middleware::Response Success
     19.05.2016 09:43 HostnameChanger Checking Product Key Activation
     19.05.2016 09:43 HostnameChanger Already activated with correct key
     19.05.2016 09:43 HostnameChanger Users still logged in and enforce is disabled, delaying any further actions
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    ---------------------------------SnapinClient---------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:43 Client-Info Client Version: 0.10.6
     19.05.2016 09:43 Client-Info Client OS:      Windows
     19.05.2016 09:43 Client-Info Server Version: 7709
     19.05.2016 09:43 Middleware::Response Success
     19.05.2016 09:43 SnapinClient Snapin Found:
     19.05.2016 09:43 SnapinClient     ID: 23
     19.05.2016 09:43 SnapinClient     RunWith: cmd.exe
     19.05.2016 09:43 SnapinClient     RunWithArgs: /c
     19.05.2016 09:43 SnapinClient     Name: Office 365 ProPlus Backup
     19.05.2016 09:43 SnapinClient     File: proplus.cmd
     19.05.2016 09:43 SnapinClient     Created: 2016-05-19 09:42:53
     19.05.2016 09:43 SnapinClient     Args: 
     19.05.2016 09:43 SnapinClient     Action: 
     19.05.2016 09:43 Middleware::Communication Download: http://fog/fog/service/snapins.file.php?mac=F4:CE:46:2F:EE:FE||00:00:00:00:00:00:00:E0&taskid=23
     19.05.2016 09:43 SnapinClient C:\Program Files (x86)\FOG\tmp\proplus.cmd
     19.05.2016 09:43 Bus {
      "self": true,
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Installing Office 365 ProPlus Backup\",\r\n  \"message\": \"Please do not shutdown until this is completed\",\r\n  \"subjectID\": \"snapin-Office 365 ProPlus Backup\"\r\n}"
    }
     19.05.2016 09:43 Bus Emmiting message on channel: Notification
     19.05.2016 09:43 SnapinClient Starting snapin...
     19.05.2016 09:44 SnapinClient Snapin finished
     19.05.2016 09:44 SnapinClient Return Code: 5
     19.05.2016 09:44 Bus {
      "self": true,
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Office 365 ProPlus Backup Installed\",\r\n  \"message\": \"Installation has finished and is now ready for use\",\r\n  \"subjectID\": \"snapin-Office 365 ProPlus Backup\"\r\n}"
    }
     19.05.2016 09:44 Bus Emmiting message on channel: Notification
     19.05.2016 09:44 Middleware::Communication URL: http://fog/fog/service/snapins.checkin.php?taskid=23&exitcode=5&mac=F4:CE:46:2F:EE:FE||00:00:00:00:00:00:00:E0&newService&json
     19.05.2016 09:44 Middleware::Communication ERROR: Could not contact FOG server
     19.05.2016 09:44 Middleware::Communication ERROR: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler.
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:44 Client-Info Client Version: 0.10.6
     19.05.2016 09:44 Client-Info Client OS:      Windows
     19.05.2016 09:44 Client-Info Server Version: 7709
     19.05.2016 09:44 Middleware::Response Success
     19.05.2016 09:44 PrinterManager Adding printers
     19.05.2016 09:44 PrinterManager IT already exists
     19.05.2016 09:44 PrinterManager IT2 already exists
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    -----------------------------------GreenFOG-----------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:44 Client-Info Client Version: 0.10.6
     19.05.2016 09:44 Client-Info Client OS:      Windows
     19.05.2016 09:44 Client-Info Server Version: 7709
     19.05.2016 09:44 Middleware::Response No actions
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    ----------------------------------UserTracker---------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:44 Client-Info Client Version: 0.10.6
     19.05.2016 09:44 Client-Info Client OS:      Windows
     19.05.2016 09:44 Client-Info Server Version: 7709
     19.05.2016 09:44 Middleware::Response Success
    ------------------------------------------------------------------------------
    
     19.05.2016 09:44 Middleware::Communication URL: http://fog/fog/management/index.php?sub=requestClientInfo&configure&newService&json
     19.05.2016 09:44 Middleware::Response Success
     19.05.2016 09:44 Service Sleeping for 125 seconds
    

    And the one without $:

     19.05.2016 09:54 Middleware::Communication URL: http://fog/fog/management/index.php?sub=requestClientInfo&mac=F4:CE:46:2F:EE:FE||00:00:00:00:00:00:00:E0&newService&json
     19.05.2016 09:54 Middleware::Response Success
     19.05.2016 09:54 Middleware::Communication URL: http://fog/fog/service/getversion.php?clientver&newService&json
     19.05.2016 09:54 Middleware::Communication URL: http://fog/fog/service/getversion.php?newService&json
    
     19.05.2016 09:54 Service Creating user agent cache
     19.05.2016 09:54 Middleware::Response Success
     19.05.2016 09:54 Middleware::Response Success
    
    ------------------------------------------------------------------------------
    ---------------------------------ClientUpdater--------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:54 Client-Info Client Version: 0.10.6
     19.05.2016 09:54 Client-Info Client OS:      Windows
     19.05.2016 09:54 Client-Info Server Version: 7709
     19.05.2016 09:54 Middleware::Response Success
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    ----------------------------------TaskReboot----------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:54 Client-Info Client Version: 0.10.6
     19.05.2016 09:54 Client-Info Client OS:      Windows
     19.05.2016 09:54 Client-Info Server Version: 7709
     19.05.2016 09:54 Middleware::Response Success
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    --------------------------------HostnameChanger-------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:54 Client-Info Client Version: 0.10.6
     19.05.2016 09:54 Client-Info Client OS:      Windows
     19.05.2016 09:54 Client-Info Server Version: 7709
     19.05.2016 09:54 Middleware::Response Success
     19.05.2016 09:54 HostnameChanger Checking Product Key Activation
     19.05.2016 09:54 HostnameChanger Already activated with correct key
     19.05.2016 09:54 HostnameChanger Users still logged in and enforce is disabled, delaying any further actions
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    ---------------------------------SnapinClient---------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 09:54 Client-Info Client Version: 0.10.6
     19.05.2016 09:54 Client-Info Client OS:      Windows
     19.05.2016 09:54 Client-Info Server Version: 7709
     19.05.2016 09:54 Middleware::Response Success
     19.05.2016 09:54 SnapinClient Snapin Found:
     19.05.2016 09:54 SnapinClient     ID: 26
     19.05.2016 09:54 SnapinClient     RunWith: cmd.exe
     19.05.2016 09:54 SnapinClient     RunWithArgs: /c
     19.05.2016 09:54 SnapinClient     Name: Office 365 ProPlus IT4005
     19.05.2016 09:54 SnapinClient     File: proplus.cmd
     19.05.2016 09:54 SnapinClient     Created: 2016-05-19 09:53:10
     19.05.2016 09:54 SnapinClient     Args: 
     19.05.2016 09:54 SnapinClient     Action: 
     19.05.2016 09:54 Middleware::Communication Download: http://fog/fog/service/snapins.file.php?mac=F4:CE:46:2F:EE:FE||00:00:00:00:00:00:00:E0&taskid=26
     19.05.2016 09:54 SnapinClient C:\Program Files (x86)\FOG\tmp\proplus.cmd
     19.05.2016 09:54 Bus {
      "self": true,
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Installing Office 365 ProPlus IT4005\",\r\n  \"message\": \"Please do not shutdown until this is completed\",\r\n  \"subjectID\": \"snapin-Office 365 ProPlus IT4005\"\r\n}"
    }
     19.05.2016 09:54 Bus Emmiting message on channel: Notification
     19.05.2016 09:54 SnapinClient Starting snapin...
     19.05.2016 10:06 SnapinClient Snapin finished
     19.05.2016 10:06 SnapinClient Return Code: 0
     19.05.2016 10:06 Bus {
      "self": true,
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Office 365 ProPlus IT4005 Installed\",\r\n  \"message\": \"Installation has finished and is now ready for use\",\r\n  \"subjectID\": \"snapin-Office 365 ProPlus IT4005\"\r\n}"
    }
     19.05.2016 10:06 Bus Emmiting message on channel: Notification
     19.05.2016 10:06 Middleware::Communication URL: http://fog/fog/service/snapins.checkin.php?taskid=26&exitcode=0&mac=F4:CE:46:2F:EE:FE||00:00:00:00:00:00:00:E0&newService&json
     19.05.2016 10:06 Middleware::Communication ERROR: Could not contact FOG server
     19.05.2016 10:06 Middleware::Communication ERROR: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler.
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 10:06 Client-Info Client Version: 0.10.6
     19.05.2016 10:06 Client-Info Client OS:      Windows
     19.05.2016 10:06 Client-Info Server Version: 7709
     19.05.2016 10:06 Middleware::Response Success
     19.05.2016 10:06 PrinterManager Adding printers
     19.05.2016 10:06 PrinterManager IT already exists
     19.05.2016 10:06 PrinterManager IT2 already exists
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    -----------------------------------GreenFOG-----------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 10:06 Client-Info Client Version: 0.10.6
     19.05.2016 10:06 Client-Info Client OS:      Windows
     19.05.2016 10:06 Client-Info Server Version: 7709
     19.05.2016 10:06 Middleware::Response No actions
    ------------------------------------------------------------------------------
    
    
    ------------------------------------------------------------------------------
    ----------------------------------UserTracker---------------------------------
    ------------------------------------------------------------------------------
     19.05.2016 10:06 Client-Info Client Version: 0.10.6
     19.05.2016 10:06 Client-Info Client OS:      Windows
     19.05.2016 10:06 Client-Info Server Version: 7709
     19.05.2016 10:06 Middleware::Response Success
    ------------------------------------------------------------------------------
    
     19.05.2016 10:06 Middleware::Communication URL: http://fog/fog/management/index.php?sub=requestClientInfo&configure&newService&json
     19.05.2016 10:06 Middleware::Response Success
     19.05.2016 10:06 Service Sleeping for 79 seconds
    

    When trying to install snaping with $ in batch i get error code 5
    the share on it4005 is accessible by everyone an the share on vs-ha-backup by authenticated users (domain) under which context is the snapin running? While trying to install the snapin iam logged on as domain admin.


  • Moderator

    I ran a default profile deploying script via snapins today from a share with a dollar sign at the end and it worked fine. Given I’m probably a few versions behind at work.


  • Senior Developer

    If you are able to run those scripts manually (with $ UNC paths), than would be a restriction of running as SYSTEM. There is nothing the client can do about this.


  • Developer

    Are you able to run the batch file with $ UNC path by hand? Which error do you get when running this as snapin?


Log in to reply
 

363
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

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