HearingTech Posted July 25, 2017 Share Posted July 25, 2017 I'm new to AutoIT, but have some basic scripting/programming understanding, so the concepts and basic logic is easy for me to grasp, and I have double checked that I am using AutoITv3. I've been working on automating a chunk of my company's rollout and while I can get it to work with local files it doesn't work with networked files. I cannot run the script off a network share as it throws the generic error: Quote Line 0 (File "filepath"): Error: Error opening the file. The other problem is that if I am to use local files it would have to be on a flash drive as copying data from the network down would take too long as it's close to 10GB of data. The beginning of my script looks like this: ; Script Start - Add your code below here #RequireAdmin #include <MsgBoxConstants.au3> #pragma compile(inputboxres, true) ;-------------------------------------------------------------------------------------------- ;Begin Installation of WSPw ;-------------------------------------------------------------------------------------------- ;Run ("C:\...\setup.exe") ;Local ;Run ("setup.exe", "W:\...\install") ;Network ;Run (@ScriptDir & ".\...\setup.exe") ;Run From Network Run ('\\IP\...\setup.exe') WinWait ("WSPw - InstallShield Wizard", "&Next >") WinActivate ("WSPw - InstallShield Wizard", "&Next >") ControlClick ("WSPw - InstallShield Wizard", "&Next >",2081) Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 26, 2017 Share Posted July 26, 2017 (edited) @HearingTech Hi and welcome to the AutoIt forum Did you try the ShellExecute() function instead of the Run() function? What's the result? Always check with If @error Then ; Some Code to display handle the error Else ; Some Code to continue the script ; ... EndIf EDIT: I just tried with ShellExecute(), and it works Edited July 26, 2017 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
HearingTech Posted July 26, 2017 Author Share Posted July 26, 2017 @FrancescoDiMuro Thank you for the help that did fix part of the problem! It looks like ShellExecute() is working, however it pauses/crashes the script as it requires credentials mid run. Is there a way to do ShellExecute() as you can RunAs()? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 26, 2017 Developers Share Posted July 26, 2017 11 minutes ago, HearingTech said: Is there a way to do ShellExecute() as you can RunAs()? RunAs()? That is not what you've shown above and likely is the issue in the first place. These credentials you use in the Runas() are they a local account or domain account? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
HearingTech Posted July 26, 2017 Author Share Posted July 26, 2017 @Jos The script above did not need to run using RunAs() being that I was running everything local. The script calls for admin rights on start, but the issue is that it requires 2 sets of rights, the first is domain admin rights to install on the computer and the second is rights for the mapped drive. If this would work with a single sign-on from a flash drive I can set that up as well. Link to comment Share on other sites More sharing options...
HearingTech Posted July 26, 2017 Author Share Posted July 26, 2017 @FrancescoDiMuro @Jos So I've been working on this all day alongside all of my other tasks at the office. I've found that ShellExecute() is able to run without issue if the script is on the desktop and the data is on a flashdrive. At this point that is good enough for this deployment, as we have 128GB flash drives, which can handle the data size for all of the installers required. So my next issue is dealing with automating the applications that have combo and list boxes, as well as require user input (names/paths/etc) and then building a GUI to run only specific applications this way each department gets only their specific installations. Thanks for your help, I'll create another posting if I run into issues with the GUI or applications, such as the AS400 which I know will cause issues. Link to comment Share on other sites More sharing options...
Danp2 Posted July 26, 2017 Share Posted July 26, 2017 Have you investigated using a silent installation so that you don't need to automate the install GUIs? LisHawj 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
HearingTech Posted July 26, 2017 Author Share Posted July 26, 2017 @Danp2 Most of the applications are proprietary and I have not heard back from the dev teams if they have any switches, others such as the AS400 are insane to automate. Link to comment Share on other sites More sharing options...
Danp2 Posted July 26, 2017 Share Posted July 26, 2017 @HearingTech Good luck. Haven't worked with an AS400 in over 20 years! Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now