tegelaar Posted April 9, 2004 Share Posted April 9, 2004 I am trying to make a silent install for DSClient for 95/98. It works fine when it isn't hidden. What do I need to change to make it work while using @SW_HIDE? Opt( "WinDetectHiddenText" , 1 ) Opt("TrayIconHide", 1) Run("setup.exe", "", @SW_HIDE) WinWait("Directory Service Client Setup Wizard", "Welcome to the Directory Service") Send("N") WinWait("Directory Service Client Setup Wizard") Send("N") WinWait("Directory Service Client Setup Wizard", "Installation completed") Send("{ENTER}") WinWait("System Settings Change") Send("N") PS - I am brand new at this so I hope this doesnt look too rediculous.. -Jim Link to comment Share on other sites More sharing options...
ezzetabi Posted April 9, 2004 Share Posted April 9, 2004 You can send keys to a hidden window. You have to use the control commands. Essentialy you have to remake the whole procedure. Link to comment Share on other sites More sharing options...
Dan Posted April 9, 2004 Share Posted April 9, 2004 (edited) I looked at an old installation package I did for the DSClient and found something that should work for you. If it is available, I always use automation methods provided by the installer rather than send clicks or keystrokes to the installer. Microsoft has a way of changing their installers, but the version of the dsclient i deployed appears to be an iexpress package. The following command line works: I may have renamed the installer to dsclient.exe (too long ago, can't remember). dsclient.exe /q /c:"setup /q" the /c switch allows you to override the install command specified in the iexpress package, so I used this to perform a silent installation by running setup with the /q switch. Edited April 9, 2004 by Dan Link to comment Share on other sites More sharing options...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 I looked at an old installation package I did for the DSClient and found something that should work for you.If it is available, I always use automation methods provided by the installer rather than send clicks or keystrokes to the installer. Microsoft has a way of changing their installers, but the version of the dsclient i deployed appears to be an iexpress package. The following command line works: I may have renamed the installer to dsclient.exe (too long ago, can't remember).dsclient.exe /q /c:"setup /q" the /c switch allows you to override the install command specified in the iexpress package, so I used this to perform a silent installation by running setup with the /q switch.Yes Ive tried that, but we are going to be running this via logon script and that way the window is visible and the user can hit cancel.. Link to comment Share on other sites More sharing options...
ezzetabi Posted April 9, 2004 Share Posted April 9, 2004 Idea (untested) Use ControlDisable to deactivate all the " cancel " button. Link to comment Share on other sites More sharing options...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 I tried this but it still doesn't work... Opt("WinDetectHiddenText",1) Opt( "TrayIconDebug", 1 ) Run( "setup.exe", "", @SW_HIDE ) click( "Directory Service Client Setup Wizard", "Welcome to the Directory Service", "TButton2" ) click( "Directory Service Client Setup Wizard", "The setup wizard is ready to install the Directory Service Client", "TButton2" ) click( "Directory Service Client Setup Wizard", "Installation completed", "TButton2" ) click( "Directory Service Client Setup Wizard", "System Settings Change", "TButton2" ) Func click( $title, $text, $button) WinWait($title, $text) WinSetState( $title, $text, @SW_HIDE ) ControlSend( $title, $text, $button, "{ENTER}" ) EndFunc Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2004 Developers Share Posted April 9, 2004 ControlSend( $title, $text, $button, "{ENTER}" )try a:ControlClick( $title, $text, $button ) 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...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 (edited) try a:ControlClick( $title, $text, $button )Thanks - now it runs but goes directly to the installation completed window with copying any files..Here is rev. #3Opt("WinDetectHiddenText",1)Opt("TrayIconDebug",1)Run("setup.exe", "", @SW_HIDE)click( "Directory Service Client Setup Wizard", "Welcome to the Directory Service", "TButton2" )click( "Directory Service Client Setup Wizard", "Ready", "TButton2" )click( "Directory Service Client Setup Wizard", "Installation completed", "TButton2" )click( "System Settings Change", "", "TButton2" )Func click( $title, $text, $button)WinWait($title, $text)WinSetState( $title, $text, @SW_HIDE )ControlClick( $title, $text, $button )EndFunc-Jim Edited April 9, 2004 by tegelaar Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2004 Developers Share Posted April 9, 2004 Jim, you are now clicking on the "TButton2", but reading the whole thread i think you want to hide the "TButton2"...right ?? then you would need to do a: ControlHide ( $title, $text, $button ) 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...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 Jim,you are now clicking on the "TButton2", but reading the whole thread i think you want to hide the "TButton2"...right ??then you would need to do a:ControlHide ( $title, $text, $button )Whoops - I posted the wrong script.I used Au3_spy to get the right button names..Opt("WinDetectHiddenText",1)Opt("TrayIconDebug",1)Run("setup.exe", "", @SW_HIDE)click( "Directory Service Client Setup Wizard", "Welcome to the Directory Service", "Button3" )click( "Directory Service Client Setup Wizard", "The setup wizard is ready", "Button3" )click( "Directory Service Client Setup Wizard", "Installation completed", "Button3" )click( "System Settings Change", "You must restart", "Button2" )Func click( $title, $text, $button)WinWait($title, $text)WinSetState( $title, $text, @SW_HIDE )ControlHide( $title, $text, $button )EndFuncWith ControlHide the script does nothing.. If it is ControlClick it works but the files dont copy - goes straight to the installation completed phase.-Jim Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2004 Developers Share Posted April 9, 2004 (edited) Jim, what should it do when you do a normal install ? Do you want to click the Button3 control ? iow how does the manual process look in steps ? Edited April 9, 2004 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 More sharing options...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 Jim, what should it do when you do a normal install ?Do you want to click the Button3 control ?iow how does the manual process look in steps ?I want to click the following buttons:next next finish noAt the screens specified... Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2004 Developers Share Posted April 9, 2004 (edited) ok... so for sure you want the controlclick... You mentioned that you used Au3_spy to check the button names: next = Button3 next = Button3 finish = Button3 no = Button2 right ? And you say it goes through all windows and clicks the correct button but doesn't copy anything .... but when you do the same manually it works fine.. you could for testing comment the WinSetState( $title, $text, @SW_HIDE ) to see what happends.. Edited April 9, 2004 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 More sharing options...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 ok... so for sure you want the controlclick...You mentioned that you used Au3_spy to check the button names:next = Button3next = Button3finish = Button3no = Button2right ?And you say it goes through all windows and clicks the correct button but doesn't copy anything .... but when you do the same manually it works fine.. you could for testing comment the WinSetState( $title, $text, @SW_HIDE ) to see what happends..Yes it is weird.. all the button names are correct. Is there any way I can pause for a minute or 2 before clicking finish?Perhaps a keystroke is interrupting the copy.The Installation Complete screen comes up and it stops there though - so it doesnt completely finish.When I comment out that line, the screens go by so fast you can even see what its doing. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2004 Developers Share Posted April 9, 2004 just put a sleep(5000) in the func. This will make the script sleep for 5 seconds before continuing with the next check... Func click( $title, $text, $button) sleep(5000) WinWait($title, $text) WinSetState( $title, $text, @SW_HIDE ) ControlHide( $title, $text, $button ) EndFunc 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...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 (edited) just put a sleep(5000) in the func. This will make the script sleep for 5 seconds before continuing with the next check...Func click( $title, $text, $button)sleep(5000)WinWait($title, $text)WinSetState( $title, $text, @SW_HIDE )ControlHide( $title, $text, $button )EndFuncIt waited 5 seconds at the first screen - then after it hit next it said the installation was complete....Also did you mean ControlHide or ControlClick?-Jim Edited April 9, 2004 by tegelaar Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2004 Developers Share Posted April 9, 2004 Think you want to do a controlclick because you want to click the buttons .... 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...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 It waited 5 seconds at the first screen - then after it hit next it said the installation was complete....Also did you mean ControlHide or ControlClick?-JimAnother though - the script is hitting button three right as the files start to copy. Button three is greyed out while copying but it is the finish button. Maybe the script is forcing a finish right as it starts copying.. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2004 Developers Share Posted April 9, 2004 (edited) ok so the control is not enabled during copying... you can test for that... just add this before the control click: while ControlCommand ($title, $text, $button, "IsEnabled", "" ) = 0 sleep(20) wend Edited April 9, 2004 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 More sharing options...
tegelaar Posted April 9, 2004 Author Share Posted April 9, 2004 ok so the control is not enabled during copying... you can test for that... just add this before the control click: while ControlCommand ($title, $text, $button, "IsEnabled", "" ) = 0 sleep(20) wendI got an error while parsing the comman - it didnt like the 0 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