Shortcut Current Directory Working Directory Powershell Run as Administrator Administrator User Account Windows Explorer

I have a shortcut that points to a Powershell script. When I double click this shortcut it opens Powershell's console in the same directory that the shortcut file is placed.

I need to do the same but running the same shortcut with administrative priviledges, so I use Run as Administrator. The problem is that the current/working directory is %systemroot%\system32 and not the directory where the shotcut is placed.

How can I setup things to get the same results as with the less privileged  (normal) user account?

Thanks in advance.

I have a shortcut that points to a Powershell script. When I double click this shortcut it opens Powershell's console in the same directory that the shortcut file is placed.

I need to do the same but running the same shortcut with administrative priviledges, so I use Run as Administrator. The problem is that the current/working directory is %systemroot%\system32 and not the directory where the shotcut is placed.

How can I setup things to get the same results as with the less privileged  (normal) user account?

Thanks in advance.

Hi

Support for PowerShell Scripting is beyond the scope of these consumer level forums.

Please post your question in the following Technet forum. The experts there should be able to help.

Technet ITPro Windows PowerShell Forum

Regards,

Thank You for using Windows 7


Ronnie Vernon MVP
MVP 1999 - Present
Windows Insider MVP

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated November 6, 2023 Views 2,221 Applies to: