问题
I found that I like the command line "Dell Command | Update" tool called dcu-cli.exe
. I can run it in a remote session, run CMD as admin, pushd to the directory with it and its dependencies, and it runs great. But, but want to be able to do this with psexec.exe, since PowerShell remoting is disabled in the network for the time being.
When I ran it with psexec.exe, I got:
Unhandled Exception:
J:\CommandUpdate>System.IO.IOException: The handle is invalid.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at Dell.CommandUpdate.CLI.Program.ShowWorking()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
When ran psexec, this is how I usually run it:
psexec.exe -s \\computer -nobanner cmd.exe /c "pushd \\path\to\CommandUpdate && dcu-cli.exe"
psexec
would use my admin credentials in cmd.exe
for -u
and -p
.
My hunch is that the BIOS update throws a GUI box asking for the administrator password. Why does it do that? LOL When it is a command line tool. Whatever Dell. Anyway, if someone out there knows how to use this on remote systems in a network where you are a domain admin, it would be great to know so I don't have to interrupt user's workflow to install driver updates for them. When done, I can just email them to restart their computer.
Thanks!
回答1:
this bugged me for ages also until I worked out that this works:
cmd /c start /wait "" "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /log C:\ProgramData\Pearson\Logs
来源:https://stackoverflow.com/questions/46821566/using-dcu-cli-exe-to-install-dell-updates-on-remote-system