New
#120
Hello @phrab,
What happens when you right click on the .bat file, and click/tap on Edit instead?
Does it open it in Notepad to view?
Thank you. I actually don't need to use this method to run Notepad or Metapad. I just wanted to test to see if I understood it & could make it work. It actually did work on a game. If I open cmd or powershell & type notepad.exe or C:\Utilities\Metapad metapad.exe, they open new text files. So I figured this bat file would crate a desktop shortcut that would do the same.
This has not happened at my end.
Click here to download the latest version of Create_an_elevated_shortcut.bat.
The shortcut shown in the following screenshot works properly. Metapad.exe will be run successfully. Windows can open it.
Do you mean the .bat script worked on a game but did not work on Notepad and Metapad?
Go to Task Scheduler-->Task Scheduler Library-->Apps. Right-click on the "Metapad" task-->Properties-->Actions. Do you see the following?
In my case, the shortcut will actually Start a program"D:\Testing\metapad.exe"
The command"D:\Testing\metapad.exe"
works on Command Prompt.
Hi Mathew:
Thank you for responding. I downloaded your latest Create_an_elevated_shortcut.bat, from the link you provided. To answer your questions:
1. First, I had been looking in the wrong place in the Task Scheduler for the task. I looked under "Task Scheduler Library" & didn't expand "Apps". I see now that I have created several tasks. See the image below. And, yes, I see a similar task action.
2. When I click the resultant Metapad shortcut, I get the following message (see screenshot):
So it creates a shortcut on my desktop & creates a task in the Task Scheduler, which appears to have the correct action. However, when I click the shortcut, all it does is flash & then I get the screen above. When I press Escape, the screen goes away, but a new text file isn't created.
This is what I have in my Utilities Folder for your utility:
3. When I used your .bat file to run a game (Bridge Buff 19), it did work; i.e. there was a flash & then the game opened. I'm just not sure why it doesn't open a new text file for Notepad or Metapad.
- - - Updated - - -
I just found my error & I apologize for wasting everyone's time. I have a program called SendToToys. It has an option to send a file to the clipboard as a name. That's what I used for the path, each time I used your utility. I just noticed that it adds an extra space after the path. That's why I kept getting error messages. When I removed that space, everything worked fine!
Again, I apologize to you & to @Brink.