Jump to content

Windows Media Player 10 Install


Recommended Posts

I need some help on a script.

I am trying to automate the install for Windows Media Player 10, but I can't get it running 100% right.

Here is the current script:

Run("MP10Setup.exe")

WinWaitActive("Windows Media Player 10", "Thank you for choosing Windows Media Player 10")

Send("!a")

WinWaitActive("Windows Media Player 10", "Confirm software download")

Send("!a")

If WinActive("Security Warning")then Send("!y")

If WinActive("Microsoft Windows Media Configuration Utility")then Send("!r")

WinWaitActive("Windows Media Player 10", "Welcome to Windows Media Player 10")

Send("!n")

WinWaitActive("Windows Media Player 10", "Select your Privacy Options")

Send("!n")

WinWaitActive("Windows Media Player 10", "Customize the Installation Options")

Send("!f")

WinWaitActive("Windows Media Player")

Sleep(5000)

WinKill("Windows Media Player")

Run("PStory1.exe")

The parts I have bolded are where it is messing up.

On some computers, A Security Warning message pops up asking is it ok to trust this program from Microsoft. In the script, it is suppose to send alt+y when that pops up, it doesn't. Same for the one below it, If service pack 2 is intall, it asks is it ok to run Microsoft Windows Media Configuration Utility. The send command part works, its just getting it so that it will register the popup windows.

Now the reason I am trying to set it up with If...Then is because only some computers get these messages.

Also a side note, if you already installed it, some message boxes don't show up so running the script to test or to take screen shots are hard.

Any help would be greatly appreciated.

Link to comment
Share on other sites

  • Developers

You are checking right after the send() for the "extra windows... You need to make sure the time is enough for them to popup.

something like this might work:

Run("MP10Setup.exe")
WinWaitActive("Windows Media Player 10", "Thank you for choosing Windows Media Player 10")
Send("!a")
WinWaitActive("Windows Media Player 10", "Confirm software download")
Send("!a")
While 1
    If WinActive("Security Warning") then Send("!y")
    If WinActive("Microsoft Windows Media Configuration Utility") then Send("!r")
    If WinActive("Windows Media Player 10", "Welcome to Windows Media Player 10") Then ExitLoop
    Sleep(50)
WEnd
Send("!n")
WinWaitActive("Windows Media Player 10", "Select your Privacy Options")
Send("!n")
WinWaitActive("Windows Media Player 10", "Customize the Installation Options")
Send("!f")
WinWaitActive("Windows Media Player")
Sleep(5000)
WinKill("Windows Media Player")
Run("PStory1.exe")
Edited by JdeB

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

I'll give these a try. If anyone else has any other input, please post it.

why not run it silent?

RunWait('MP10Setup.EXE /Q:A /R:N /C:"setup_wm.exe /DisallowSystemRestore /Q:A /R:N"')
I'm confused (could be because I am still learning this), but doesn't the RunWait command pauses script execution until the program finishes. So that would cause the whole thing not to work right? Edited by Sorian
Link to comment
Share on other sites

  • Moderators

I'll give these a try. If anyone else has any other input, please post it.

I'm confused (could be because I am still learning this), but doesn't the RunWait command pauses script execution until the program finishes. So that would cause the whole thing not to work right?

In this case it would cause the script to pause until the installation is finished, it just cuts out the need for all the coding your trying to do. I mean, while your "self made" installation script is running, are you able to do anything else other than looking for windows and or controls? Then this is the same thing but easier.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

In this case it would cause the script to pause until the installation is finished, it just cuts out the need for all the coding your trying to do.

ok, so then the script would change from

Run("MP10Setup.exe")
WinWaitActive("Windows Media Player 10", "Thank you for choosing Windows Media Player 10")
Send("!a")
WinWaitActive("Windows Media Player 10", "Confirm software download")
Send("!a")
While 1
    If WinActive("Security Warning") then Send("!y")
    If WinActive("Microsoft Windows Media Configuration Utility") then Send("!r")
    If WinActive("Windows Media Player 10", "Welcome to Windows Media Player 10") Then ExitLoop
    Sleep(50)
WEnd
Send("!n")
WinWaitActive("Windows Media Player 10", "Select your Privacy Options")
Send("!n")
WinWaitActive("Windows Media Player 10", "Customize the Installation Options")
Send("!f")
WinWaitActive("Windows Media Player")
WinKill("Windows Media Player")
Run("PStory1.exe")

To

Run("MP10Setup.exe")
RunWait('MP10Setup.EXE /Q:A /R:N /C:"setup_wm.exe /DisallowSystemRestore /Q:A /R:N"')
WinActive("Windows Media Player 10", "Welcome to Windows Media Player 10")
Send("!n")
WinWaitActive("Windows Media Player 10", "Select your Privacy Options")
Send("!n")
WinWaitActive("Windows Media Player 10", "Customize the Installation Options")
Send("!f")
WinWaitActive("Windows Media Player")
WinKill("Windows Media Player")
Run("PStory1.exe")

Right?

Edited by Sorian
Link to comment
Share on other sites

no it would change from

Run("MP10Setup.exe")
WinWaitActive("Windows Media Player 10", "Thank you for choosing Windows Media Player 10")
Send("!a")
WinWaitActive("Windows Media Player 10", "Confirm software download")
Send("!a")
While 1
If WinActive("Security Warning") then Send("!y")
If WinActive("Microsoft Windows Media Configuration Utility") then Send("!r")
If WinActive("Windows Media Player 10", "Welcome to Windows Media Player 10") Then ExitLoop
Sleep(50)
WEnd
Send("!n")
WinWaitActive("Windows Media Player 10", "Select your Privacy Options")
Send("!n")
WinWaitActive("Windows Media Player 10", "Customize the Installation Options")
Send("!f")
WinWaitActive("Windows Media Player")
WinKill("Windows Media Player")
Run("PStory1.exe")
oÝ÷ ÚÚºÚ"µÍ[ØZ]
    ÌÎNÓTLÙ]VHÔNHÔÐÎ][ÝÜÙ]ÝÛK^HÑØ[ÝÔÞÝ[TÝÜHÔNHÔ][ÝÉÌÎNÊB[   ][ÝÔÝÜLK^I][ÝÊB

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Adding some registry entries before installing may help. Been awhile since I installed WMP.

Test with these entries

RegWrite('HKCU\Software\Microsoft\MediaPlayer\Preferences', 'AcceptedPrivacyStatement', 'Reg_Dword', '0x00000001')
RegWrite('HKCU\Software\Microsoft\MediaPlayer\Preferences', 'FirstRun', 'Reg_Dword', '0x00000000')
RegWrite('HKLM\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer', 'GroupPrivacyAcceptance', 'Reg_Dword', '0x00000001')
Link to comment
Share on other sites

  • 2 years later...

I am interested to know why the silent install for this works better than writing a script for the installation which you can see it happening. Im new to AutoIT and was having exactly the same trouble on this one. I needed an automated install of WMP 10 for a peer to peer network, where i have to locally install everything and need something to speed up my time on installs.

Can silent installs be done for most software???

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