Jump to content

Install drivers on remote systems


Go to solution Solved by orbs,

Recommended Posts

Hi All

Just got wind of AutoIT

I need to install drivers on remote systems and dont have access to group policy.

These are exe driver files and I will be installing these remotely under the regular user accounts that dont the administrator rights.  I have the admin rights myself and can install it locally but its not efficient

That version of the the driver may already be installed on some of those systems so Auto IT script may encounter an unexpected window in which case Im thinking I should get it to exit and abandon the installation or use an..  if window x appears do action y scenario if I can.

Im thinking one way would be to use a batch file to xcopy the autoIT script the file to all the traget pcs then use psexec to execute this

Id really like a sample script that can install a program and handle different windows during the installation e.g.  [install this driver]  or  This driver already exisits [Overwrite]

Id need to know how to launch this remotely for user acounts that dont have the rights themselves to install programs.

Im thinking this may be a combination autoIT, windows batch, powershell, psexec etc.  but maybe its much simpler???

Thanks for reading

Confuseis.

 

Link to comment
Share on other sites

  • Solution

hello confuseis, welcome to AutoIt and to the forum!

first, i assume you have at-least some client machines running Windows newer than XP (i.e. Vista, 7, 8, 8.1). if you have only XP machines (or older), then things get easier.

in general, you can not install drivers/software under a non-admin account. but fortunately, you don't need to; if you deploy remotely (directly or by psexec) then you are using your admin account, so no issue there. you will encounter this issue if you try to initialize the install process in the user context - for example, in the logon script. avoid that. you can either do a remote silent deployment, or local interactive installation. you usually can not combine the two - UAC, user permissions and session isolation will come in the way - so don't even try, it's a battle already lost.

now, assuming you go for remote silent deployment, you'd want to avoid the exe and use either driver files (commonly .inf and .dll files) or installation packages (.msi files)

if you can obtain the driver files of your exe, either from the vendor or by extracting from the exe, then check-out DPInst - a formal MS tool designed for drivers pre-installation, may suit you well:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff544842(v=vs.85).aspx

if you can obtain the .msi alternative, very simple to deploy with a combination of psexec and msiexec.

if you have no driver files and no installation package, then what you are installing is not a driver but an application, which requires a different approach. first, your application may have a built-in deployment option - check the command-line switches of your exe, consult the vendor support if possible.

if you have not that option, then you are beginning to sink into a swamp. for every additional step described below, take extra care to test in full before put to production.

for one, you can re-package your "driver" using an external tool like AppDeploy Packager (very useful and free, although not open source):

http://www.itninja.com/blog/view/the-appdeploy-repackager

now, as you probably noticed, nothing described until now involves AutoIt. if you got to here, and still no solution, then this is where AutoIt kicks in.

AutoIt has some very helpful tutorials, which are the first thing you should spend your next 5 minutes on. look at the help file for the automated installation of WinZip (yeah, WinZip. autoIt is that old ;) ). this should give you a clear view on how AutoIt can handle dialog windows presented by the installer. use the example to generate your own installation script.

when you got that, the next step is to launch the script on remote workstations. now you are sinking even deeper into the swamp. you can not launch it in the user context (no permissions), and if you launch it in another session the interactive operation will be crippled.

for this there are some creative solutions, but i advise you begin with attempting the first steps of this post, and if you eventually do get to this point, we can discuss further.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

This was very useful.  In particular used winzip to extract the contents of the exe there was a heap of files with a text document explaining how to do a silent install.   I followed this wrestled with psexec and managed to install the drivers on the remote machines.   I could even use the DOS  driverquery /s <hostname> command to see if the driver had been changed.

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...