Jump to content

Shellexecute stopped working "properly" for me


Champak
 Share

Recommended Posts

I have this simple line to launch a jpg using windows Photos, ShellExecute($DisplayPhoto1[0]) (The variable is a path to a jpg). Windows did that stupid update a couple nights ago and ever since then every time this executes the window pops up asking what app I want to use to open the file. I select the Photos app and check the always use this app, but even though I check the always use this app, this window keeps coming up. Now if I go and click a jpg file directly, the image opens up in Photos without any issue. What has happened? What can I do to fix or work around this? And no, I can't do a windows roll back because for some reason all of my windows recovery points were wiped out even though I have over 200G of free space smh.

I also tried: Run(@ComSpec & " /c rundll32.exe C:\Windows\System32\shimgvw.dll,ImageView_Fullscreen " & $DisplayPhoto1[0]) but that doesn't work for me because it actually opens a different app and command prompt.

EDIT: I also checked the default app settings and it shows that Photos is set as the default for jpg files, but this popup window keeps coming up asking me which program I want to use.

Edited by Champak
Link to comment
Share on other sites

  • Champak changed the title to Shellexecute stopped working "properly" for me

Just tested both:
start "this.jpg" opens my default handler.
rundll32.exe C:\Windows\System32\shimgvw.dll,ImageView_Fullscreen "this.jpg" opens Windows Photo Viewer.

What you claim should be impossible, since you're calling shimgvw.dll. No clue of what's going on. Using Win 10 (2004) here. What version are you using ?.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

It's just a basic path...I did your suggestion in a file by itself.

$command = @SystemDir & "\Rundll32.exe Url,FileProtocolHandler " & "C:\Users\User\Desktop\Newfolder2\IMG_5301.jpg"
Run($command)

Anyway, I went into Recovery and did an advanced startup and uninstalled the update from there...I forgot about this area. That fixed the problem (uninstalling them from control panel wasn't working). What I don't understand is why these damn updates are always sneaking onto my system. Every time I think I defeated one of these auto updates and update proofed my computer, BAM I get another one. Why can't microsoft leave me alone!?!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...