Sign in to follow this  
Followers 0
ptt

computer management and simulate a setup file

7 posts in this topic

#1 ·  Posted (edited)

wonder if anyway to create shortcut for computer management or any further sub tree in the computer management window like device manager? .......access this manually by right click on my computer, then click manage.

Another question. i wnt to write a script in autoit to run a setup.exe file ..... how do i know when the setup stop at certain time ( for example : wait for user response to certain button like ok or user agreement.) so i can send {enter} or mouseclick on it ....i mean i wnt the whole simulation w/o man hands on.

Edited by ptt

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

This will open Device Manager:

Run(@SystemDir & '\mmc.exe ' & @SystemDir & '\devmgmt.msc')

To find what screen the installer is currently on, use Winactive()) or Winwait() or similar. Then you can send various clicks to the buttons using controlsend() or controlclick(). Use autoit window info tool to get the ClassnameNN of the button and then place that in the ControlID parameter in quotes. For more information, look those functions up in the help file. I would help you more, but you haven't provided me with sufficient information to give examples.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

This will open Device Manager:

Run(@SystemDir & '\mmc.exe ' & @SystemDir & '\devmgmt.msc')

To find what screen the installer is currently on, use Winactive()) or Winwait() or similar. Then you can send various clicks to the buttons using controlsend() or controlclick(). Use autoit window info tool to get the ClassnameNN of the button and then place that in the ControlID parameter in quotes. For more information, look those functions up in the help file. I would help you more, but you haven't provided me with sufficient information to give examples.

Share this post


Link to post
Share on other sites

Thank you for your help. I hve 2 more questions.

how about open from computer management to see what service is runing? ( services under services and applications)

is there any command like VB6 to see the computer screen coordinate?

like this :

y = Screen.Height / Screen.TwipsPerPixelY

x = Screen.Width / Screen.TwipsPerPixelX

I tried to use controlsend .....but this command it requires to enter the window text right? what if the window text is very long ? lol.. i tried send() and it works !. but i think i hve a better method.

ControlSend ( "title", "text", controlID, "string" [, flag] )

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

When running an msc file, it is pretty much the same for all of them:

Run(@SystemDir & '\mmc.exe ' & @SystemDir & '\services.msc')
oÝ÷ Ù'+yéÇz(!¶+zÉ-¢ÞmIÊÞzu¢vØb°7¬Ú)Z'mò¢ìÛh~)Ý¢ëmë"Íæ§v,بÚÂ)Ý£az{¬yh§ëO¢Ê®¢Ûb¶Wªºjºm{jºJyêbh§vØZ·*.v÷öØZ½ëh·*^{ayéí·­Ù^!ûa{§v"±¬"Ú0Ê£ºË­æ­yÜ"*Þj×­éò¢ç붫zÛ«ö¥¹çë¢kaxe
·µánËb¢v§vZqëaz·­º¹ïj[{azØ­êZ­©µêíéâ·¥ø§vØ^Â)Ý£ajܨº;¬µÊÞj×­è­Ù^²Ê¶­Ù^N¬Çë¢kaz¥¥ø¥zéÝzº)¶«¨µå¢8­ãµÈL¡×׫²Ø^ëa¡ÛajجºÇ¶µÈpwhÂح뺸§Ç­Èh¥êÚ¶*'³

You can change the parameter to have it search for the title of the window in the manner you want.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

Thank you ver much KM.

Espcially the hint of find the window position instead of the whole desktop screen.

i hve a question about msc file: how do i know the exact msc file name w/o using search from window ....is there a list somewhere? ;) ....

Run(@SystemDir & '\mmc.exe ' & @SystemDir & '\services.msc')

Run(@SystemDir & '\mmc.exe ' & @SystemDir & '\devmgmt.msc')

Share this post


Link to post
Share on other sites

No list that i know of. Try googling for it or searching the windows folder for msc files. What i showed you i knew from experience because i use them frequently.


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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