I've made the next URL file using text editor:
[InternetShortcut]
URL=http://192.168.33.7/
IconFile=http://192.168.33.7/SomeICOFile.ico
HotKey=0
IconIndex=0
IDList=
and saved it on the desktop.
under windows XP The shortcut icon is the file saved on the server - SomeICOFile.ico
under windows 7 and 10 it gets the default browser icon as icon. (Yet, it leads to the right page).
I had the same problem. It seems that the name of the .url file must be same like the name of the .ico file in Win10
Related
I am working on a script that assigns remote apps as default programs for opening different types of files on a Windows Server 2016 Remote Desktop Session Host.
It works for file types that don't already have a default.
I am trying to change the default image viewer. However, my script ends up adding it as an open with "choice" for the user but ms paint is used by default on a double click from file explorer.
Here is an example of the explorer registry tree for .jpg:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithList]
"a"="mspaint.exe"
"MRUList"="ab"
"b"="mstsc.exe"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithProgids]
"jpegfile"=hex(0):
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
"Hash"="Qw/OEl5uE2E="
"ProgId"="PBrush"
Can I simply delete the .jpg OpenWithList and UserChoice trees and replace it with this?
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithList]
"a"="mstsc.exe"
"MRUList"="a"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
Will this make explorer open the jpegfile with the mstsc.exe program without prompting the user to make a selection?
Ok, I've read here and here that is not possible, on a gerneral browser, to force a link to be opened in IE.
So my question is: can I do it with a desktop launcher?
Extended question: Can I easily create a desktop launcher on Windows (10, 7 and maybe older versions) that if double clicked opens a specific URL in IE?
You can create a batch file to run the command to open IE with a specific url. You can create a .bat file and put the following code in the file:
start iexplore "http://www.bing.com"
Double click the .bat file, then it will open IE with Bing website.
Result:
General goal: create a desktop shortcut to a folder buried the file structure of my phone's SD card (connected via USB). Note, this is on a work computer, so I can't do anything to crazy.
I tried using normal shortcuts to no avail, so I decided to try using a batch if I can't use a shortcut. If using a shortcut is possible or there is a better option than a batch let me know.
Specific question: How can I open a folder using a batch file? I can manually open explorer, paste the address into the bar and go there, so there should be a way to mimic this, but so far my attempts have been unsuccessful.
Attempts:
%SystemRoot%\explorer.exe "Computer\My S4\Phone\Android\data\com.dropbox.android\files\scratch\"
explorer Computer/My S4/Phone/Android/data/com.dropbox.android/files/scratch
start "" "Computer\My S4\Phone\Android\data\com.dropbox.android\files\scratch\"
start Computer\My S4\Phone\Android\data\com.dropbox.android\files\scratch
This is an addition to Andry's answer:
It can be very complicated to get the whole path to an MTP folder like
::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_03de&pid_21e7&mi_00#6&a5ebb37&1&0000#{6ac27878-a6fc-2155-ea85-f98f491d4f33}\{E4FC4EA5-FFFF-FFFF-0000-000000000000}
To get the path do the following:
In Windows Explorer select the folder on the MTP device you want to get the path of.
Open it's context menu and select Copy
Open in Explorer a folder on your PC, open the context menu on a free area and select Paste Shortcut
Now we need a too that can read .lnk files. I have used the tool LECmd. Execute LECmd.exe -f <path to the .lnk file created in step 3>.
You will get a lot of content printed to the console. The interesting part is the Parsing Path next to the end.
In my case it was ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_03de&pid_21e7&mi_00#6&a5ebb37&1&0000#{6ac27878-a6fc-2155-ea85-f98f491d4f33}\SID-{10001,,21003612160}\{E4FC4EA5-FFFF-FFFF-0000-000000000000}
Now we are close, unfortunately the path shown above can not be used because it contains an invalid part: \SID-{10001,,21003612160}. Remove that part and you can open the explorer in that MTP folder using
start "" "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_03de&pid_21e7&mi_00#6&a5ebb37&1&0000#{6ac27878-a6fc-2155-ea85-f98f491d4f33}\{E4FC4EA5-FFFF-FFFF-0000-000000000000}"
There is a way to open an MTP device folder directly in the Windows Explorer window on Windows 7 x64.
Here is steps:
Open Windows Explorer with the My Computer folder, for example:
start "" "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
start "" "shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
explorer "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
explorer "shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
The complete list of GUIDs you can find on the internet, for example: https://www.tenforums.com/tutorials/3123-clsid-key-guid-shortcuts-list-windows-10-a.html
Attach the MTP device and enable File Transfer mode in the device. It must be shown in the My Computer window as a portable device entry.
Drag and Drop the MTP device entry icon to the Desktop.
Open any notepad, for the instance, Windows notepad: Win+R -> notepad
Drag and drop the desktop icon into notepad window.
At the end of the notepad text would be something like:
::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_0e8d&pid_201d&mi_00#7&1084e14&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33} (spaces removed).
You can cleanup the spaces between characters by copy the string into another instance of the notepad and replace them through the Ctrl+H to nothing.
Now you can open the MTP device folder directly:
start "" "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_0e8d&pid_201d&mi_00#7&1084e14&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\<your-local-path-to-folder>"
There is a wait timeout, so the Windows Explorer window might not open immediately.
To generate a shortcut to target folder you can use make_shortcut.vbs script from here: https://github.com/andry81/contools/tree/HEAD/Scripts/Tools/ToolAdaptors/vbs/
For example:
>
make_shortcut.vbs myphonecamera.lnk "shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_0e8d&pid_201d&mi_00#7&1084e14&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SD-card Samsung\DCIM\Camera
Now you can click myphonecamera.lnk to open the folder or use the Windows Explorer:
>
explorer myphonecamera.lnk
Instead of using Computer which is not a device name, try to use \\?\ or \\.\ which both refer to the local computer.
I'm trying to change the icon of an exe I have already compiled (can't recompile).
I've read that you can do this using CLI by doing:
ResHacker.exe -addoverwrite "FILE.exe", "FILE_OUT.exe", "ICON_FILE.ico", ICONGROUP, MAINICON, 0
My problem is that I tested this exe in several VMs.
On Windows 7 & 8 I see the new icon.
On XP & Server 2003, I see the "blank" icon Here's how it looks, it's basically white with a blue menu bar on top
The exe is a 7zip SFX. Anyone knows what could be going on?
Thanks.
I am facing a problem in my friend's pc.All shortcuts pointing to an exe opens in adobe acrobat and output the error "This file format is not supported".This is the same when any exe(program exe or setup exe) is launched.I doubt the problem is in the registry that has become corrupt and is opening all executable files with adobe pdf.I cannot even run regedit to edit the entries as even that opens with adobe pdf with the error.Please guide how can the problem be solved through some script.The OS is windows 7 Ultimate.
You could to create .txt file from desctop. Then write:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.exe]
#="exefile"
"Content Type"="application/x-msdownload"
[HKEY_CLASSES_ROOT\.exe\PersistentHandler]
#="{098f2470-bae0-11cd-b579-08002b30bfeb}"
Then save as blabla.reg and run it. Click "OK". I think, it's all :)