0
votes

So here's the case.

I'm in an a domain environment (Windows 7) where users are stripped from local administrator group. I created a batch file to install a program and it requires administrator privilege. After installation I want the program to be pinned to the current user start menu. The way I pinned it is by calling a powershell script from inside the batch file to do that.

So I can elevate the batch file to have admin privilege, but the problem is the program will not be pinned to the current user, and instead it is pinned for the admin user that I'm using to elevate the batch file. I'm guessing that this is because the powershell script was called from inside an elevated batch file, so it is also elevated.

Is there any way for me to achieve what I want without splitting the script?

1
Can you post your batch file so we can see what you are doing? It's hard to offer advice without knowing what your script contains... - James C.

1 Answers

0
votes

I think that your problem is not about privileges or user. You are probably editing the wrong environement to pin your program.

You should copy (or create) your shortcut in :

C:\Users\%USER%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar