Sign in to follow this  
Followers 0
tegelaar

Dsclient Install

26 posts in this topic

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

Share this post


Link to post
Share on other sites



You can send keys to a hidden window. You have to use the control commands.

Essentialy you have to remake the whole procedure.

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Dan

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Idea (untested)

Use ControlDisable to deactivate all the " cancel " button.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

ControlSend( $title, $text, $button, "{ENTER}" )

try a:

ControlClick( $title, $text, $button )


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#8 ·  Posted (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. #3

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", "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 by tegelaar

Share this post


Link to post
Share on other sites

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 )


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 )

EndFunc

With ControlHide the script does nothing.. If it is ControlClick it works but the files dont copy - goes straight to the installation completed phase.

-Jim

Share this post


Link to post
Share on other sites

#11 ·  Posted (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 by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

no

At the screens specified...

Share this post


Link to post
Share on other sites

#13 ·  Posted (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.. :D

you could for testing comment the WinSetState( $title, $text, @SW_HIDE ) to see what happends..

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

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.

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#16 ·  Posted (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 )

EndFunc

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?

-Jim

Edited by tegelaar

Share this post


Link to post
Share on other sites

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?

-Jim

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

Share this post


Link to post
Share on other sites

#19 ·  Posted (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 by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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
I got an error while parsing the comman - it didnt like the 0

Share this post


Link to post
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
Sign in to follow this  
Followers 0