Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Create a shortcut with admin rights for the current vbscript or any other application

Hi 😋
I made a subroutine in order to create a shortcut for the current vbscript or any other application with arguments using an array that can be called as follow :
  • Example 1 : Create a shortcut to the current vbscript on the Desktop
Code
Create_Shortcut Array("Desktop","ShortcutName",WScript.ScriptFullName)

OR
  • Example 2 : Create a shortcut to the current vbscript on the User Startup Folder
Code
Create_Shortcut Array("Startup","ShortcutName",WScript.ScriptFullName)

OR
  • Example 3 : Create a shortcut for Network Diagnostics with arguments to fix connections problems on Desktop

Code
'Create_Shortcut Array(_
'   "Desktop",_ '<=== "Desktop" folder and you can change it to "Startup" folder if you want
'   "NetworkDiagnostics",_  '<=== ShortcutName
'   "%SystemRoot%\system32\msdt.exe",_  '<=== Executable Target Path
'   "-skip TRUE -path %Windir%\diagnostics\system\networking -ep NetworkDiagnosticsPNI",_ ' <==== Argument to pass for the executable
'   "%SystemRoot%\system32\msdt.exe,0",_  ' <=== Icon Location
'   "Network Diagnostics to fix connections problems",_ ' <=== Description of our Shortcut
'   "CTRL+ALT+D"_ ' <=== Set a HotKey
')

Run_As_Admin_Create_Shortcut.vbs
Run_As_Admin_Create_Shortcut.vbs (Click to View)


Possibly Related Threads...
Thread / Author Replies Views Last Post
by DramaKingNov 28, 2023 01:58 AM 3 362 Nov 28, 2023 01:58 AM
Last Post: jleeme
by arul12Nov 23, 2023 10:10 AM 2 154 Nov 23, 2023 10:10 AM
Last Post: arul12
[C#] by opsecJun 17, 2022 02:11 PM 2 222 Jun 17, 2022 02:11 PM
Last Post: benio2