Snapins again
-
said in Snapins again:
\upow-8.intranet\public\Office2016_PL_32B\
is this share readable by everyone and not only every authenticated user?
If this is a domain computer you have to be authenticated else it won’t work.Try to open that share while you are logged in with a local user (not domain authenticated) and try to run the script manually.
Why do you copy whole installation directory to the destination to install? Why not running directly via network, it’s time wasting to copy
infront. For example:\\upow-8.intranet\public\Office2016_PL_32B\setup.exe /adminfile \\upow-8.intranet\public\Office2016_PL_32B\Unattended.msp
Regards X23
-
As I’ve said before, I’m fairly sure batch scripts don’t work nicely on UNC paths. You can use batch to map a unc path but running filea directly from unc always seems hit or miss. While you can do it manually, sometimes, scripts don’t seem to like doing it.
-
@Tom-Elliott I’ve never had issues copying files straight from UNC paths though, although I use copy /y instead of xcopy most of the time so results may vary.
-
@Quazz I didn’t pay close enough attention and didn’t see the xcopy of the file. That said maybe the OP can try using copy /y vs. xcopy?
-
@Tom-Elliott Also, adding the backslash to the targetpath is sometimes necessary, I seem to recall copy commands asking if it’s a file or directory when that’s not specified, lol.
-
@Quazz
Yes script run manually work.
With /wait instead /c task stuck. -
@robza Start /wait , not cmd /wait?
-
@x23piracy
This share is readable for everyone. It is no domain computer (it is linux with samba).
Script run manualy works perfectly.
Running snapin with this content:\\upow-8.intranet\public\Office2016_PL_32B\setup.exe /adminfile \\upow-8.intranet\public\Office2016_PL_32B\Unattended.msp
in fog.log got this:
---------------------------------SnapinClient--------------------------------- ------------------------------------------------------------------------------ 30.05.2016 21:41 Client-Info Client Version: 0.10.6 30.05.2016 21:41 Client-Info Client OS: Windows 30.05.2016 21:41 Client-Info Server Version: 7931 30.05.2016 21:41 Middleware::Response Success 30.05.2016 21:41 SnapinClient Snapin Found: 30.05.2016 21:41 SnapinClient ID: 922 30.05.2016 21:41 SnapinClient RunWith: cmd.exe 30.05.2016 21:41 SnapinClient RunWithArgs: /C 30.05.2016 21:41 SnapinClient Name: Office 2016_32_PL_cmd 30.05.2016 21:41 SnapinClient File: office2016_pl_32.cmd 30.05.2016 21:41 SnapinClient Created: 2016-05-30 19:41:25 30.05.2016 21:41 SnapinClient Args: 30.05.2016 21:41 SnapinClient Action: 30.05.2016 21:41 Middleware::Communication Download: http://fog-server/fog/service/snapins.file.php?mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=922 30.05.2016 21:41 SnapinClient C:\Program Files (x86)\FOG\tmp\office2016_pl_32.cmd 30.05.2016 21:41 Bus { "self": true, "channel": "Notification", "data": "{\r\n \"title\": \"Installing Office 2016_32_PL_cmd\",\r\n \"message\": \"Please do not shutdown until this is completed\",\r\n \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}" } 30.05.2016 21:41 Bus Emmiting message on channel: Notification 30.05.2016 21:41 SnapinClient Starting snapin... 30.05.2016 21:41 SnapinClient Snapin finished 30.05.2016 21:41 SnapinClient Return Code: 1 30.05.2016 21:41 Bus { "self": true, "channel": "Notification", "data": "{\r\n \"title\": \"Office 2016_32_PL_cmd Installed\",\r\n \"message\": \"Installation has finished and is now ready for use\",\r\n \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}" } 30.05.2016 21:41 Bus Emmiting message on channel: Notification 30.05.2016 21:41 Middleware::Communication URL: http://fog-server/fog/service/snapins.checkin.php?taskid=922&exitcode=1&mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService&json
Nothing happend.
-
@Quazz
With start /wait got this in log:31.05.2016 08:31 Client-Info Client Version: 0.10.6 31.05.2016 08:31 Client-Info Client OS: Windows 31.05.2016 08:31 Client-Info Server Version: 7931 31.05.2016 08:31 Middleware::Response Success 31.05.2016 08:31 SnapinClient Snapin Found: 31.05.2016 08:31 SnapinClient ID: 929 31.05.2016 08:31 SnapinClient RunWith: start 31.05.2016 08:31 SnapinClient RunWithArgs: /wait 31.05.2016 08:31 SnapinClient Name: Office 2016_32_PL_cmd 31.05.2016 08:31 SnapinClient File: office2016_pl_32_z.bat 31.05.2016 08:31 SnapinClient Created: 2016-05-31 06:31:02 31.05.2016 08:31 SnapinClient Args: 31.05.2016 08:31 SnapinClient Action: 31.05.2016 08:31 Middleware::Communication Download: http://fog-server/fog/service/snapins.file.php?mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=929 31.05.2016 08:31 SnapinClient C:\Program Files (x86)\FOG\tmp\office2016_pl_32_z.bat 31.05.2016 08:31 Bus { "self": true, "channel": "Notification", "data": "{\r\n \"title\": \"Installing Office 2016_32_PL_cmd\",\r\n \"message\": \"Please do not shutdown until this is completed\",\r\n \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}" } 31.05.2016 08:31 Bus Emmiting message on channel: Notification 31.05.2016 08:31 SnapinClient Starting snapin... 31.05.2016 08:31 SnapinClient ERROR: Could not start snapin 31.05.2016 08:31 SnapinClient ERROR: Unable to find file 31.05.2016 08:31 Middleware::Communication URL: http://fog-server/fog/service/snapins.checkin.php?taskid=929&exitcode=-1&mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService&json ------------------------------------------------------------------------------
-
xcopy supports UNC paths. Ever since I found that out, I stopped doing mapped drives in scripts.
-
@robza and @Wayne-Workman, just thinking out here. So we know the script runs flawlessly manually. Sorry if this is a silly question, but which user do you run it as? I believe the snapins run as SYSTEM (i think, correct me if I’m wrong). Could this have anything to do with the discrepancy we are seeing?
-
@fry_p They do run as the
SYSTEM
user. One thing to do is redirect output to a log file for every line. Then you will be able to see where it fails.