Jump to content


  • 0
HGITS

AutoIT program failing during OSD

Question

Hello Guys,

I'm wondering if you guys can help me out here. I'm running out of ideas and could deffinetly use some help.

 

Without going into too much back story we HAVE to use autoIT to deploy one of our apps during OSD. I wrote out a script and complied it into an .exe, and we'll call it app.exe.

Heres how it basically works:

I launch app.exe, which launces the application install file from a seperate server.

It then enters the username and password to install the app.

the app then copies all its files to the c drive in a folder called ASI

once its done it dialog box pops up and the application is installed.

 

I have tested this running it manually and it works fine. I have even ran it AFTER it failed during OSD and it installed with no issues.

I've looked into the logs and havent seen anything that really stands out other then it failed :)

 

i've noticed that the script is, at least, starting properly, as the ASI folder is created on the c drive and there are about 50 files in there. A proper install will have 300+ files in there so I know its kicking off the install, its just erroring out, or stalling or somehow not finishing in the 15 minute window i've got it set to.

 

any ideas?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

<p class="author_info">

 

after more digging i found this post. I guess I'll have to find a way to push it right after the install unless anyone knows of ANY way around this

 

http://www.autoitscript.com/forum/topic/123056-autoit-and-sccm/

 

Posted 11 December 2010 - 12:21 AM

No, an AutoIt program will work through SCCM OSD. It depends on how you are using AutoIt. So in the example you show you are wrapping another programs install routine with AutoIt and you are not able to suppress the original programs install windows. The script is just giving the necessary keystrokes needed for the program to install. So this install will not be silent and will most likely fail in the OSD process as the OSD process does not interact with the desktop, and you also have to remember when packaging a program for the OSD process you only have access to the Local machine registry and not the users. These have nothing to do with AutoIt but are limitations applied by the OSD process. Whereas if you wrote a simple script to install Java and then have it write the registry key to disable the next generation plug-in that will work in the OSD process as you can install Java silently via the command line. Your script will still work in SCCM but you just have to install it as an application outside of the OSD process after someone has already logged onto the computer. You also mention the UAC you do not have to worry about that as the SCCM Client takes care of it.

Share this post


Link to post
Share on other sites

  • 0

Ok so I found a work around. I've noticed that it’s kind of hard to find some information about SCCM if you don’t know EXACTLY what you're looking for. It took me a while to find some useful websites with similar issues and I'll try my best to explain it here for anyone who runs across similar issues.

FYI This I got this info from this site:

http://www.appdeploy...e=1&key=

 

Problem:

 

Task Sequence fails when attempting to install software that is NOT silent, IE has some sort of prompt or GUI that pops up. In my case, I was attempting to automate an installation of EPIC, an Insurance management software by Applied Systems. There was no way to do a silent Installation and I had to provide credentials so AutoIT was really my only viable solution

 

Cause / Why this REALLY happens:

 

There are a few reasons behind this so I’ll try my best to explain it.

 

1 Without going into too much detail there are different “sessions” or interactive accounts in a windows computer. Session 0 is reserved for the System account. The System account is used for some pretty important behind the scenes windows processes and is also a completely HIDDEN session. Meaning that if there are any prompts or popups we will not see them unless it gets passed to a different session. With that said every user that logs in then gets a different session number. IE session #1 or #2, and every session other then 0. Is interactive and can see/manipulate prompts and such.

 

2 Task Sequences are meant to have ZERO user interaction, they are here to help us with OSD. Because there is zero interaction “needed” all installs are done using the system account or session 0. ß This is why my AutoIT script would fail. It was waiting to send data to a certain window/field that “didn’t exist” for my particular session.

 

3 Task Sequences will NOT install a software package where “Allow users to interact with the program” is checked, which makes sense.

 

Workaround/solution:

 

After much searching I ran across a post that had this solution. I have tested and it does work.

Please See attached image for the fields below

post-9417-0-15855500-1327360573_thumb.jpg

  1. Create the package and program. If you check the box “Allow users to interact with the program”, then the install will happen within a different session number, I’m assuming one of the SMS accounts?<-- correct me if I’m wrong, HOWEVER : you cannot use the program in the “Install Software” step of a TS

  1. Add a “Run Command Line” step and for the “Command Line” field and type in the Program name IE epicinstall.exe.
  2. For the “Start In” field, type in the location of the package
  3. Make sure to Check the “Package” box and select the appropriate package

If you dont know how to find out the Package location you can check the package status and it will show the path. see below

 

post-9417-0-91488400-1327360585_thumb.jpg

 

 

 

And there you go. You can now install an application that has popups or is not completely silent from a TS and not have to rely on logging in after the install and doing it there. I'm still learning a lot about SCCM so please correct me if I've made mistakes on Why this happens.

Share this post


Link to post
Share on other sites

  • 0

This method saved me some time glad it is still out there 6 years later!

Instead of using the 'Start In:' option with the server path you can use the 'Command line:' option only and input .\epicinstall.exe or cmd /c .\epicinstall.exe.

That will use the file in the package vs a server share.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.