Quantcast
Channel: Group Policy forum
Viewing all articles
Browse latest Browse all 19997

GPP shortcuts with cmd.exe

$
0
0

Hi, I need a GPP shortcut pointing to a batch file that needs to be able to be pinned to the Taskbar, to achieve the latter I use cmd.exe as described here:

http://mattrefghi.com/blog/2012/06/how-to-pin-a-batch-file-to-the-taskbar-in-windows-7/

This works perfectly fine if I just create the shortcut manually on a client PC desktop, but I am unable to create the shortcut using GPP in the User Configuration. I've tried the following:

C:\System32\cmd.exe" /c "\\server\share\folder\script.bat"

%SystemDir%\cmd.exe /c "\\server\share\folder\script.bat"

%WindowsDir%\System32\cmd.exe /c "\\server\share\folder\script.bat"

"\\server\share\folder\cmd.exe" /c "\\server\share\folder\script.bat" (obviously copied cmd.exe into the server share here and again, it works if I manually create the shortcut).

All these give the event warning of:

------------------

Event ID:4098

The user 'my_shortcut" preference item in the 'Group Site Policy Group Policy object did not apply because it failed with error code '0x80070002 The system cannot find the file specified.' This error was suppressed.

------------------

With a Target Path of just "\\server\share\folder\script.bat" the shortcut gets created via GPO just fine. But then I cannot pin it to the taskbar.

Any ideas?


Viewing all articles
Browse latest Browse all 19997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>