Jump to content

Creating Shortut for PCs in Windows Server

Hey guys, is it possible to create a shortcut through windows server's GPO but with the program running on the PC itself? I'm asking this because those PCs have a lot of restrictions such as creating shortcut in the desktop. And even using the right click on the mouse.

 

For example, let's say i want to create a Microsoft Office 2019 Shortcup on the Desktop from the Server on the Users PCs, is it possible?

PS: Server is R2 2012.

"Once there was an explosion, a bang that gave birth to time and space. Once there was an explosion, a bang that set a planet spinning in that space. Once there was an explosion, a bang that gave rise to life as we know it... And then came the next explosion. An explosion that will be our last"

 

"... To see the world in a grain of sand. Heaven in a wild flower

Hold infinite in the palm of your hand.  And eternity in an hour ..."

 

PC: 1

CPU: AMD Ryzen 9 3900X 4.3GHz 1.3875v Motherboard: AsRock X470 Taichi (BIOS: Agesa 1.0.0.3 ABB) RAM: 4x8GB(32) 3200MHzCL16 Hyper X GPU: GTX 980 Ti Waterforce Xtreme Core Clock: 1595MHz Memory Clock: 8000MHz Storage: SAMSUNG EVO 860 2TB(OS) / SAMSUNG EVO 860 1TB(Backup) Cooler: NZXT Hydro X72 360mm Case: NZXT Phantom 820 PSU: Corsair TX-750w Display Monitor: Monitor AOC AG251FG 240Hz G-Sync 1080p Headset: Headset LogiTech G633 OS: Windows 10 Pro 64-bit (Version: 1909 / OS Build: )

NOTEBOOK:

Model: Acer Aspire 5516 CPU: AMD TF-20 1.6GHz(1C/1T) GPU: ATI Radeon X1200(256MB) RAM: 4GB(2x2GB) 666MHz HD: SSD Sandisk PLUS 240GB OS: Windows 7 Ultimate SP1 x64

Link to comment
Share on other sites

Link to post
Share on other sites

basically yes, but is more like, deploy an script that make the shortcut on the desktop user,  first  it had to be an script to run when the user login to the pc, second, the application had to be already installed on the user PC, and you just need to  put this on the script:

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
SET LinkName=Hello
SET Esc_LinkDest=%%HOMEDRIVE%%%%HOMEPATH%%\Desktop\!LinkName!.lnk
SET Esc_LinkTarget=%%SYSTEMROOT%%\notepad.exe
SET cSctVBS=CreateShortcut.vbs
SET LOG=".\%~N0_runtime.log"
((
  echo Set oWS = WScript.CreateObject^("WScript.Shell"^) 
  echo sLinkFile = oWS.ExpandEnvironmentStrings^("!Esc_LinkDest!"^)
  echo Set oLink = oWS.CreateShortcut^(sLinkFile^) 
  echo oLink.TargetPath = oWS.ExpandEnvironmentStrings^("!Esc_LinkTarget!"^)
  echo oLink.Save
)1>!cSctVBS!
cscript //nologo .\!cSctVBS!
DEL !cSctVBS! /f /q
)1>>!LOG! 2>>&1

 

how to make a shortcut from cmd:

https://superuser.com/questions/392061/how-to-make-a-shortcut-from-cmd

 

how to deploy a script using GPO:

https://www.petri.com/setting-up-logon-script-through-gpo-windows-server-2008

 

note: its for 2008 but for 2012 its almost the same.

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, SrSuri said:

basically yes, but is more like, deploy an script that make the shortcut on the desktop user,  first  it had to be an script to run when the user login to the pc, second, the application had to be already installed on the user PC, and you just need to  put this on the script:


@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
SET LinkName=Hello
SET Esc_LinkDest=%%HOMEDRIVE%%%%HOMEPATH%%\Desktop\!LinkName!.lnk
SET Esc_LinkTarget=%%SYSTEMROOT%%\notepad.exe
SET cSctVBS=CreateShortcut.vbs
SET LOG=".\%~N0_runtime.log"
((
  echo Set oWS = WScript.CreateObject^("WScript.Shell"^) 
  echo sLinkFile = oWS.ExpandEnvironmentStrings^("!Esc_LinkDest!"^)
  echo Set oLink = oWS.CreateShortcut^(sLinkFile^) 
  echo oLink.TargetPath = oWS.ExpandEnvironmentStrings^("!Esc_LinkTarget!"^)
  echo oLink.Save
)1>!cSctVBS!
cscript //nologo .\!cSctVBS!
DEL !cSctVBS! /f /q
)1>>!LOG! 2>>&1

 

how to make a shortcut from cmd:

https://superuser.com/questions/392061/how-to-make-a-shortcut-from-cmd

 

how to deploy a script using GPO:

https://www.petri.com/setting-up-logon-script-through-gpo-windows-server-2008

 

note: its for 2008 but for 2012 its almost the same.

 

Thank you.

I'll try those method and i'll give you guys some feedback if it worked.

"Once there was an explosion, a bang that gave birth to time and space. Once there was an explosion, a bang that set a planet spinning in that space. Once there was an explosion, a bang that gave rise to life as we know it... And then came the next explosion. An explosion that will be our last"

 

"... To see the world in a grain of sand. Heaven in a wild flower

Hold infinite in the palm of your hand.  And eternity in an hour ..."

 

PC: 1

CPU: AMD Ryzen 9 3900X 4.3GHz 1.3875v Motherboard: AsRock X470 Taichi (BIOS: Agesa 1.0.0.3 ABB) RAM: 4x8GB(32) 3200MHzCL16 Hyper X GPU: GTX 980 Ti Waterforce Xtreme Core Clock: 1595MHz Memory Clock: 8000MHz Storage: SAMSUNG EVO 860 2TB(OS) / SAMSUNG EVO 860 1TB(Backup) Cooler: NZXT Hydro X72 360mm Case: NZXT Phantom 820 PSU: Corsair TX-750w Display Monitor: Monitor AOC AG251FG 240Hz G-Sync 1080p Headset: Headset LogiTech G633 OS: Windows 10 Pro 64-bit (Version: 1909 / OS Build: )

NOTEBOOK:

Model: Acer Aspire 5516 CPU: AMD TF-20 1.6GHz(1C/1T) GPU: ATI Radeon X1200(256MB) RAM: 4GB(2x2GB) 666MHz HD: SSD Sandisk PLUS 240GB OS: Windows 7 Ultimate SP1 x64

Link to comment
Share on other sites

Link to post
Share on other sites

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

×