Jump to content

Click app but open something else.


Recommended Posts

I am trying to create a script that when you click on paint it will open a certain jpg. I have tried a few things but can’t get this working and any help would be greatly appreciated. Here are some things I’ve tried  

 

Run ( “mspaint.exe”, “xyz.jpg” )

Run ( “mspaint.exe”, “c:\users\username\documents\xyz.jpg

Link to comment
Share on other sites

you can use Photo Viewer like this from cmd line, still, photoviewer actually runs

c:\%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1
 
That could be a batch file you call, the %1 would be the name of your image.

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

Thank you, everyone, for your replies. Earthshine you are correct there is no good reason. Davidowicza I can not do that either. I should have stated this in the beginning that the whole reason I am trying to do this for. This is nothing more than a prank for my boss, we go back and forth pulling pranks on each other. So I thought it would be cool if I took an application he uses a lot "not necessarily paint" and when he clicked on it to open it would not open that but a jpg. 

Link to comment
Share on other sites

  • Moderators

smithr355,

You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing "prank" scripts - before you post again and then you will understand why you will get no help and this thread will now be locked.

M23

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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