Jump to content
Sign in to follow this  
nazirm

Windows 8/Windows Server 2012 - Automation of Start App

Recommended Posts

nazirm

Hi:
 
I test installation of few products in various windows environments.  I have developed a script which works well in Windows 7 and Windows Server 2008.  Now I would like to extend the functionality to Windows 8 and Windows Server 2008.  How can I do it? What is the equivalent of Send("^{esc}")?
 
I am hoping I can do it with Autoit! 
 
Regards,
Nazir
 
Here is the code that works well in Windows 7 and Windows Sever 2008.  How can I rewrite it for Windows 8 and Windows 2012?
 
 

Send("^{ESC}")
WinWaitActive("Start menu","",2)
sleep(1000)
ControlClick("Start menu","","[CLASS:Button; INSTANCE:1]")
$hTree = ControlGetHandle("Start menu", "", "[CLASS:SysTreeView32; INSTANCE:1]")
_GUICtrlTreeView_Expand($hTree,_GUICtrlTreeView_FindItem($hTree,"particular_item"))
$hdlChild = _GUICtrlTreeView_GetFirstChild($hTree,"particular_item")
_GUICtrlTreeView_ClickItem($hTree,$hdlChild)
....
Edited by nazirm

Share this post


Link to post
Share on other sites
ravaged1

I think it would be better if you started these from the executable like ShellExecute("notepad.exe")

Then it wouldn't matter what version of windows you are using.

Share this post


Link to post
Share on other sites
nazirm

Thanks.

ShellExecute("notepad.exe") will execute the application.  But I want to test the links in the start menu...to check if the links work.  Many times the links point to the wrong location.  I want to test the links the way user will perform the actions.

Any help will be appreciated.  Also, please let me know if it cannot be done.

Regards,

Nazir

Share this post


Link to post
Share on other sites
BrewManNH

Those links are in a folder, on Windows 7, the All Users start menu folder is located in "C:ProgramDataMicrosoftWindowsStart MenuPrograms" you can parse the folders under that for the links that you're looking for and use ShellExecute on the .lnk files in there.

Or use FileGetShortCut and make sure that those shortcuts are created correctly, which is probably easier than trying to open them just to see if they were created right.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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  

×