.NET Framework - PowerShell and Click Once
Asked By Vlinc
02-May-07 02:37 PM
Hello, first time poster!
I'm currently investigating if PowerShell can:
-Open an Internet Explorer browser.
-Navigate to a given URL
-Click on the given hyperlink which is basically a .application
i.e.: <a href="myApp.application">Click here to launch application</a>
-Once the hyperlink is clicked, the application basically launches and waits
for a username and password.
So far I've manage to make PS open a IE Browser and navigate to a specific
URL but I haven't found how to make it click the hyperlink so that the
application launches...
Oh and...while I'm here...is there a quick and dirty way to monitor when the
application is finished downloading so I can start "login" in.
Thanks in advance for any help on this.
Sincerely
Vince
PowerShell
(1)
URL
(1)
ScriptingAnswers
(1)
MyApp
(1)
VinceMore
(1)
DOM
(1)
IE
(1)
PS
(1)
Vlinc replied...
On my machine, if io open Internet Explore and type the following URL in the
address bar: http://www.myserver.com/myApp.application
And press ENTER
My application automaticaly starts downloading...
When doing the following in PowerShell, nothing happens:
$oIE=new-object -com internetexplorer.application
$oIE.Visible = $true
$oIE.navigate2("http://www.myserver.com/myApp.application")
So why is nothing happening when this is invoked from PS but if I simply
copy/paste the URL inside the address bar, the application starts downloading
on my machine.
Why is that?
Thanks in advance
Sincerely
Vlince
Don Jones [MVP] replied...
- Yes
- Yes
- Darn difficult - you have to use the DOM to grab the link and execute its
Click method, and I'm not sure if the ad-hoc adaptation of the IE COM object
will let you at it. Take a look at the MSDN DHTML reference - it's got some
examples of this.
--
Don Jones
Windows PowerShell MVP
Founder: www.ScriptingAnswers.com
Co-Author: "Windows PowerShell: TFM"

uninstalling Version 1.0 in anticipation of installing the CTA. I have no reference to Powershell or the referenced Updates when I run add / remove programs - with the show updates box Version 1 and see if the uninstall appears in add / remove.) Thank you, Fred Jacobowitz Powershell Discussions Microsoft.PowerShell.Commands.Management.resources (1) Microsoft.PowerShell.Commands.Utility.resources (1) Microsoft.PowerShell.ConsoleHost.resources (1) Microsoft.PowerShell.Commands.Management (1) Microsoft.PowerShell.Security.resources (1) Microsoft.PowerShell.ConsoleHost (1) System.Management.Automation.resources (1) Windows XP (1) In message <1194565205.518301.302920
secured credit card .NET Framework http: / / card.2youtop.info [URL = http: / / card.2youtop.info / index.html]secured credit card[ / URL] [URL = http: / / card.2youtop.info / card-credit-instant-secured.html]card credit instant secured[ / URL] [URL = http: / / card.2youtop.info / card-cash-credit-secured.html]card cash credit secured URL] [URL = http: / / card.2youtop.info / card-credit-in-secured-uk.html]card credit in secured uk[ / URL] [URL = http: / / card.2youtop.info / account-card-credit-savings-secured.html]account card credit savings
1) ContentStyle (1) TopNav (1) Ineteractive (1) Submenus (1) Cheshire (1) Would you provide the url to your page or paste the source code in of the page and css et button2B2.jpg" height = "17" width = "62" alt = "About Us" onmouseover = "FP_swapImg(1, 0, / *id* / 'AboutUs', / *url* / '. . / Images / Buttons / button2C1.jpg')" onmouseout = "FP_swapImg(0, 0, / *id* / 'AboutUs', / *url* / '. . / Images / Buttons / button2B2.jpg')" onmousedown = "FP_swapImg(1, 0, / *id* / 'AboutUs', / *url* / '. . / Images / Buttons / button2D1.jpg')" onmouseup = "FP_swapImg(0, 0, / *id* / 'AboutUs url* / '. . / Images / Buttons / button2C1.jpg')" / > style = "left: 131px;" src = ". . / Images / Buttons / button1C.jpg" height = "17" width = "71" alt = "Contact Us" onmouseover = "FP_swapImg(1, 0, / *id* / 'Contact', / *url* / '. . / Images / Buttons / button1D.jpg')" onmouseout = "FP_swapImg(0, 0, / *id* / 'Contact', / *url* / '. . / Images / Buttons / button1C.jpg')" onmousedown = "FP_swapImg(1, 0, / *id* / 'Contact url* / '. . / Images / Buttons / button1E.jpg')" onmouseup = "FP_swapImg(0, 0, / *id* / 'Contact', / *url* / '. . / Images / Buttons / button1D.jpg
nur f?r Steuerelemente der eigenen Anwendung. - - M S Herfried K. Wagner M V P <URL:http: / / dotnet.mvps.org / > V B <URL:http: / / dotnet.mvps.org / dotnet / faqs / > Hallo Stefan, ok. das ist vollkommen richtig so. Jetzt oder bei Steuerelementen dann passender 'SendMessage' + 'WM_GETTEXT'. - - M S Herfried K. Wagner M V P <URL:http: / / dotnet.mvps.org / > V B <URL:http: / / dotnet.mvps.org / dotnet / faqs / > GetWindowText sendet selber WM_GETTEXT und geht f?r Fentster nde im Widerspruch zur Dokumentation von 'GetWindowText'. - - M S Herfried K. Wagner M V P <URL:http: / / dotnet.mvps.org / > V B <URL:http: / / dotnet.mvps.org / dotnet / faqs / > Hallo Frank, Frank Dzaebel schrieb: Wenn das so w Fenstern nicht zu verwenden, sparen k?nnen. - - M S Herfried K. Wagner M V P <URL:http: / / dotnet.mvps.org / > V B <URL:http: / / dotnet.mvps.org / dotnet / faqs / > Hallo Stefan! Stefan Simon schrieb: Bei benutzerdefinierten Fensternachrichten, wie
Powershell omitted in Vista. .NET Framework Why was powershell omitted in the default installation of Windows Vista? Why didn't the powershell team think of using UAC to elevate any application using powershell scripts to do certain tasks that may be virulent? And may be to have a exclusion list requires elevated privileges through UAC. I do expect an answer for this in PowerShell in Action by Bruce Payette, but not sure whether the answer is there actually, as book. Please pour in your thoughts. Hope this will be a interesting discussion. . . Regards, Mugunth Powershell Discussions Powershell (1) Vista (1) IIS (1) MVP (1) XP (1) UAC (1) ScriptingAnswers (1) OPTIONAL (1) PowerShell wasn't "done" in time to be included in the final