AutoJohn Posted May 5, 2021 Share Posted May 5, 2021 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. 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. Link to comment Share on other sites More sharing options...
argumentum Posted May 5, 2021 Share Posted May 5, 2021 ok, C:\Windows\System32\cmd.exe /c start shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0} But ... what for ???? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
AutoJohn Posted May 5, 2021 Author Share Posted May 5, 2021 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. argumentum 1 Link to comment Share on other sites More sharing options...
Confuzzled Posted May 13, 2021 Share Posted May 13, 2021 Create a batch file? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now