Jump to content

theak
 Share

Recommended Posts

Getting an error every time I have this AutoIT exe included in my MDT deployment:

IMG_7100.thumb.JPG.3fb87b977ff28de32eeb0

 

Here's the settings I have it within MDT:

mdt_settings.thumb.JPG.539a6810cd7abf03c

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 by theak
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Tried these settings...

 mdt_settings.thumb.JPG.38b6f8a880a0f1e13

and ending up getting this error:

 

IMG_7115.thumb.JPG.81f95d7623e8adbb0ec45

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 by theak
Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

@jguinch
Couldn'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 by spudw2k
Link to comment
Share on other sites

  • Administrators

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. 

Link to comment
Share on other sites

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 by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

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?

mdt_settings2.thumb.JPG.c4319963c7db86d7

Link to comment
Share on other sites

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].

 

 

Link to comment
Share on other sites

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

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.exe
The MDT application is created like this :
Command line : script.exe
Working directory : .\Applications\MyApps

 

Link to comment
Share on other sites

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

  • 5 months later...

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 2022-02-19 - Version 1.6.1.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 (NEW 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

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

×
×
  • Create New...