theak Posted September 15, 2015 Share Posted September 15, 2015 (edited) Getting an error every time I have this AutoIT exe included in my MDT deployment: Here's the settings I have it within MDT:Here's the script (BasicInstall-Trend+MSOffice2013+Lync2013,exe) I'm running:ShellExecuteWait("\\domain.name\cofs\Organization\its\_Support\AutoIT\MSOffice2013Install.exe") ShellExecuteWait("\\domain.name\cofs\Organization\its\_Support\AutoIT\MSLync2013Install.exe") RunWait("\\domain.name\cofs\Organization\ITS\_Support\AUSTIN!\AutoHotKey\Ninite Java NET Reader Silverlight Installer.exe") ShellExecute("\\server-name-av\ofcscan\AutoPccP.exe")Here's the separate scripts it calls on:MSOffice2013Install.exe#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.0 Author: AK Script Function: Install Office 2013 with no config options, to remove config options, run exe manually #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here ShellExecute('\\server-name-fs02\apps$\Office2013\setup.exe', '/config "\\domain.name\cofs\Organization\its\_Support\AutoIT\MS Office 2013\config.xml"')MSLync2013Install.exe#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.0 Author: AK Script Function: Install Lync 2013 with no config options, to remove config options, run exe manually #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here ShellExecute('\\domain.name\cofs\Organization\its\_Software & Hardware\Microsoft\Lync-2013_32-BIT_X64\x86\setup.exe', '/config "\\domain.name\cofs\Organization\its\_Support\AutoIT\MS Lync 2013\config.xml"') Losing my marbles on this one. Can't seem to figure it out. Edited September 15, 2015 by theak Link to comment Share on other sites More sharing options...
spudw2k Posted September 15, 2015 Share Posted September 15, 2015 What are the share and file perms for the .\cofs share? Have you tested running the scripts as the ..-adm service account to verify the script works and the account has proper perms? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
jguinch Posted September 16, 2015 Share Posted September 16, 2015 The report says : The directory name is invalid.I don't know if a UNC path is allowed as working directory in a Run command line task (it's not possible in a cmd so maybe it's the same thing) Try to use the full path in the command line, and remove the Start in path:\\domain.name\cofs\Organization\ITS\_Support\AutoIt\BasicInstall-Trend+MSOffice2013+Lync2013.exe Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
theak Posted September 22, 2015 Author Share Posted September 22, 2015 (edited) The report says : The directory name is invalid.I don't know if a UNC path is allowed as working directory in a Run command line task (it's not possible in a cmd so maybe it's the same thing) Try to use the full path in the command line, and remove the Start in path:\\domain.name\cofs\Organization\ITS\_Support\AutoIt\BasicInstall-Trend+MSOffice2013+Lync2013.exeTried these settings... and ending up getting this error: I KNOW that I'm entering the user name and password correctly, so I'm not sure what the issue is? Is it not authenticating properly on the server? Edited September 22, 2015 by theak Link to comment Share on other sites More sharing options...
theak Posted September 22, 2015 Author Share Posted September 22, 2015 Is there a best practices on using MDT in combination with AutoIT that I'm missing? Link to comment Share on other sites More sharing options...
jguinch Posted September 22, 2015 Share Posted September 22, 2015 Personnaly, for this kind of execution, I declare a new MDT application (using Application without source files or elswere on the network) with a .bat script stored on the deployment share.This .bat connects to the server using credentials that I specify (in clear in the .bat file) with a net use command and then run the command that I want.I don't think it's a good practice (because the password is not encrypted), but it avoids me to edit several task sequence, I just have to edit the .bat file once, that's all.Note that the .bat file can be replaced by an AutoIt script, compiled or not. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
spudw2k Posted September 22, 2015 Share Posted September 22, 2015 (edited) @jguinchCouldn't you configure your share perms for Everyone to have Read-Only, that way you don't have to provide credentials? Of course, if you are required to disable the User Rights Assignment Network access: Let Everyone permissions apply to anonymous users, the perms won't work. Edited September 22, 2015 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Administrators Jon Posted September 22, 2015 Administrators Share Posted September 22, 2015 One thing to watch out for is the version of WinPE you use. If you use an x64 version of WinPE then you must use a x64 version of Autoit - the x86 version won't work. Apart from that there shouldn't be any issues. Well, none I've come across. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
iamtheky Posted September 22, 2015 Share Posted September 22, 2015 (edited) Does the path exist in the users proflle (at that point, i dont exactly know where that is in the install)? What happens if you uncheck the bottom box? Edited September 22, 2015 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
theak Posted September 22, 2015 Author Share Posted September 22, 2015 Personnaly, for this kind of execution, I declare a new MDT application (using Application without source files or elswere on the network) with a .bat script stored on the deployment share.This .bat connects to the server using credentials that I specify (in clear in the .bat file) with a net use command and then run the command that I want.I don't think it's a good practice (because the password is not encrypted), but it avoids me to edit several task sequence, I just have to edit the .bat file once, that's all.Note that the .bat file can be replaced by an AutoIt script, compiled or not. So I made multiple applications instead of using the AutoIT files, I got the same errors. Not sure why I thought I wouldn't...So now, I'm confused about something in MDT. I thought it used the credentials entered at the beginning were used throughout the whole deployment process?Will I need to make a separate share now with access for everyone, or setup a batch file like jguinch mentioned?Is there no way to manually plug in credentials at the start of the 'application deployment' section? Link to comment Share on other sites More sharing options...
theak Posted September 23, 2015 Author Share Posted September 23, 2015 Anyone? Link to comment Share on other sites More sharing options...
jguinch Posted September 23, 2015 Share Posted September 23, 2015 Do you really need to run the script with the specified account, or just have acces to the remote share ?Maybe you should add a DriveMapAdd call at the beginning of your script to access the remote share with the good rights.You should make a log file (or use some MsgBox) with a AutoIt exe to see what happens. For example, use DriveMapAdd and look at what it returns, and the try with FileExits Run[Wait] or ShellExecute[Wait]. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
theak Posted September 24, 2015 Author Share Posted September 24, 2015 Do you really need to run the script with the specified account, or just have acces to the remote share ?Maybe you should add a DriveMapAdd call at the beginning of your script to access the remote share with the good rights.You should make a log file (or use some MsgBox) with a AutoIt exe to see what happens. For example, use DriveMapAdd and look at what it returns, and the try with FileExits Run[Wait] or ShellExecute[Wait]. Yes the share is password protected from other users. However, I suppose I could just copy them locally to the deployment server?The most recent error I received when making each application to install an 'application' within MDT was 'unexpected error code 2'.I looked up the error code and it typically means file not found.So my question is, how can I get the AutoIT script to use the rights for a user account with access to the shares I need? Link to comment Share on other sites More sharing options...
jguinch Posted September 24, 2015 Share Posted September 24, 2015 It seems your problem is relative to MDT, not AutoIt.I use several AutoIt scripts with MDT (created as application), stored in the <DeploymentShare>\Applications\MyApps\script.exeThe MDT application is created like this :Command line : script.exeWorking directory : .\Applications\MyApps Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
iamtheky Posted September 24, 2015 Share Posted September 24, 2015 Random theory:I think the only reason you are seeing Autoit in the errors, is because it is the first item in the State Restore Group, and anything in that group would fail. I think it is still an environment error, but I would move my bet to the boot order of the machine. In that you reboot back into your PE instead of the HD. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Cvcorv Posted February 28, 2016 Share Posted February 28, 2016 where to download the exe file? Link to comment Share on other sites More sharing options...
water Posted February 28, 2016 Share Posted February 28, 2016 How should people know what you are talking about? Please be always as specific as possible. I already posted the solution in your other tread. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki 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