Avatar of GGHC
GGHC

asked on 

How to change a Windows shortcut's "Target" and "Start in" via script from C:\Program Files (x86)\ to Program Files\

We have user that have roaming shortcuts both Chrome and Office apps. They toggle between systems that have apps installed as (x86) or native 64-bit.  This causes issue with the shortcuts.
Many are Chrome apps (using --app=https://.. in the Target)

-How do I programmatically change the "Target" and "Start in" to just replace the ..(x86)\ or add it back without affecting the rest of the path.

- Is it possible that a script can get an inventory of the one that are ..(x86) and the one that aren't from a given path?
   -Possible to do it by using if Exist statements( for example if exist "C:\Program Files\Google\Chrome\   Replace shortcut with

Open to other suggestions. 

Windows OSScripting Languages

Avatar of undefined
Last Comment
GGHC

8/22/2022 - Mon