1

I have a PowerShell script which opens Internet Explorer, then finds a website and clicks on the site to open it:

$IE = new-object -com internetexplorer.application
$IE.navigate("https://www.google.com/search?ei=j-KLWrGyI5G2gQbN9KOQAg&q=%D8%AF%D8%A7%D9%86%D9%84%D9%88%D8%AF+%D9%85%D9%88%D8%B2%DB%8C%DA%A9&oq=%D8%AF%D8%A7%D9%86%D9%84%D9%88%D8%AF+%D9%85%D9%88%D8%B2%DB%8C%DA%A9&gs_l=psy-ab.3..0l10.509762.515959.0.516306.23.19.1.0.0.0.358.2")
$IE.visible=$true
while($ie.busy) {sleep 5} 

$Link = $IE.Document.getElementsByTagName("span") | ? {$_.InnerHTML -eq "دانلود آهنگ جدید | دانلود موزیک"}

$Link.click()

Can I check the version in this script of my website version and update by Update-ModuleManifest to automatically download a new script from my web site to replace this script?

1 Answer 1

1

It's difficult to understand what you're trying to do. You're talking about updating a module manifest yet you've asked to check a version of a script.

What I can suggest is that you post your script to powershellgallery.com and use Update-Module (if it's a module) or Update-Script (if it's a script). I've done this to maintain scripts/modules I've written and it works well.

Where is your logic for checking the website version? I'm assuming if you had a tag in the website you could pull this element. Maybe post the full code in English too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.