Jump to content

Recommended Posts

Posted

Hi,

I been banging my head on this and not making any progress.

I want to know how to create a RUN box shortcut icon on the desktop via code.

EG: explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}

 

This example does not work and I'm not sure what the correct syntax is or if there is some other method other than FileCreateShortcut to create an icon for this command.

image.png.046f1587c185a82559ae04a7652e14f0.png

FileCreateShortcut( "explorer.exe",@desktopdir  & "\run.lnk" ,@DesktopDir,"Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}")

 

A list of such items can be found at: https://winaero.com/clsid-guid-shell-list-windows-10/

 

 

Thanks.

Posted

Thanks I ended up with:

FileCreateShortcut( "C:\Windows\System32\cmd.exe",@desktopdir & "\Run.lnk" ,@DesktopDir,"/c start shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}","","%systemRoot%\system32\shell32.dll","",24,@SW_HIDE)

The "why" was  that I am dealing with a sysprep'd vm image where times the keyboard was not working initially so I wanted to have the run and CMD.exe icons as a quick backup option on the desktop.

 

Thank you again.

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
  • Recently Browsing   0 members

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