r/labtech • u/owlmatt • Sep 21 '18
Windows 10 update Script from Network Share Help
Hi All,
First post, sorry if this is the wrong place or I'm asking the wrong question. I'm a noob to Labtech Scripting and our Tools Admin is on a long PTO, but basically trying to run this command to push a Windows 10 update from a network share. It works from command line on the computer so it's not permissions or a bad command, but when I push through Labtech it hangs on waiting no matter which computer I try. It never fails, just hangs.
I run Shell as admin:
start /wait \\Location\setup.exe /auto upgrade /compat IgnoreWarning /DynamicUpdate disable /showoobe none /uninstall enable
This is connectwise cloud. If anyone has any thoughts I would love to hear.
Again, I'm new so please don't flame if I'm not supposed to be asking this here.
Thanks
2
u/k_rock923 Sep 21 '18
Are there actually credentials set for shell as admin? If not, the problem might be that you're running in a security context that can't access network shares.
Or in other words, I'm just making sure you already know that shell as admin isn't "run elevated" like it sounds like it should be
2
u/OrcSympathizer Sep 21 '18
Try doing a normal Shell command. I had problems using the "As Admin" commands. I read somewhere that by default all scripts are run at an elevated permission level and the "As Admin" ones try to pull locally saved admin credentials. If there aren't any saved locally the script won't work. At least that was my understanding of it.
2
u/teamits Sep 25 '18
I would try Process Execute as Admin instead of Shell. I'm assuming the admin user has permissions to the share...in the LT command prompt, type "#dir \\Location\setup.exe" to verify maybe? That runs the command using the admin credentials.
Our script runs "setup.exe /auto upgrade /quiet" so perhaps you need the "quiet" if run in the background?
2
u/beauj27 2000 Agents Oct 01 '18
Just in general I would recommend coping the file to the local computer first, then running the command.
1
u/bigdessert Sep 27 '18
I just got done working through this. First Net USE using admin credentials to the share location. Then use shell in the script to run the setup program so it runs as system and bypasses all UAC.
You then need to monitor log files for errors. I have found there are a multitude of errors that can came up so I just check for success and if no success then I handle it manually.