beaker Posted May 11, 2007 Posted May 11, 2007 I'm using shortcut.exe to create shortcuts to other applications with no problem. What I'd really like to do is create a shortcut that replicate is what happens when you double-click "My Computer". It can be done by right-clicking "My Computer" and selecting "Create Shortcut", my question is how can this be accomplished via command-line or some other automated fashion?
gunsmokingman Posted May 12, 2007 Posted May 12, 2007 I'm using shortcut.exe to create shortcuts to other applications with no problem. What I'd really like to do is create a shortcut that replicate is what happens when you double-click "My Computer". It can be done by right-clicking "My Computer" and selecting "Create Shortcut", my question is how can this be accomplished via command-line or some other automated fashion?I do not know if this is what you wanted, but here is a VBS script that creates a shortcut on yourdesktop that opens My Computer.Save As Link_MyComputer.vbsConst MY_COMPUTER = &H11&Dim Act, Desktop, Link, ObjF, ObjFItem, Shell Set Act = CreateObject("Wscript.Shell") Set Shell = CreateObject("Shell.Application") Set ObjF = Shell.Namespace(MY_COMPUTER) Desktop = Act.SpecialFolders("Desktop") Set Link = Act.CreateShortcut(Desktop & "\Computer.lnk") Set ObjFItem = ObjF.Self Link.TargetPath = ObjFItem.Path Link.WindowStyle = 1 Link.Hotkey = "CTRL+SHIFT+A" Link.IconLocation = "Shell32.dll, 15" Link.Description = "Shortcut To My Computer" Link.WorkingDirectory = Desktop Link.Save
beaker Posted May 14, 2007 Author Posted May 14, 2007 Nope, not what I was looking for... I'm looking to automate this:It can be done by right-clicking "My Computer" and selecting "Create Shortcut", my question is how can this be accomplished via command-line or some other automated fashion? I'm guessing I'll need to hext edit the shortcut and see what's diffeent about the target.
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