I'd run the script in a GPO as a computer startup script. To DesktopPath = Shell.SpecialFolders("AllUsersDesktop")īut note that depending on the user's privileges and when you run the script, they may get a UAC box asking to sign in as an admin on Windows Vista/7. I don’t use Intune so I cannot speak for this myself, but I have seen many people pointing to this walkthrough if it helps. If you want to check the public desktop, then change the line that reads DesktopPath = Shell.SpecialFolders("Desktop") Creating shortcuts from specific websites or programs 1.) Right-click anywhere on your desktop background and hover your cursor over New, and then choose Shortcut 2. Username "john" logs in, the code will look at "C:\Users\john\Desktop\" or "C:\Documents and Settings\john\Desktop"). This guide will show you how to create desktop shortcuts for programs or websites in Windows 11 through three different methods. The above code will look at the specific user's desktop (i.e. Set FSO = CreateObject("Scripting.FileSystemObject")ĭesktopPath = Shell.SpecialFolders("Desktop") Set Shell = CreateObject("WScript.Shell") ' This VB script removes the requested desktop shortcuts Add to your Project a reference to Windows Script Host Object Model and using IWshRuntimeLibrary, then run this: string shortcutPath ' SomePath.lnk' var wShell new WshShell () var wLink (IWshShortcut)wShell.CreateShortcut (shortcutPath) wLink.TargetPath Application.ExecutablePath wLink. According to that page it’s been verified to work on Windows 2000, XP, Vista, and 7. Not my script, I pulled it from this Microsoft site. Alternatively, you can double-click the MinimServer desktop icon if you chose to. BAT), but here is a VB script that is system agnostic. To start MinimServer on Windows, select the Start Menu item for MinimServer. To run one of these examples, copy the code below into a new program file and run it. In order to run this example, you must have the Windows Script Host installed on your computer. This program demonstrates how to use the Windows Script Host to create a shortcut on the Windows Desktop. You didn’t specify a type of script (VBS vs. Examples to create a desktop shortcut with WSH.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |