The vjoy folder is in Program Files. XYPlorer thinks it is in Program Files x86 but there is nothing there.
Is there a fix for this?
XYPlorer thinks file is in Program Files x86 but it is not
Re: XYPlorer thinks file is in Program Files x86 but it is not
Yes, right click on your shortcut, than Properties, than change Program Files (x86) into %ProgramW6432%
Of course, don't change it if your file/folder is really in Program Files (x86).
Of course, don't change it if your file/folder is really in Program Files (x86).
Re: XYPlorer thinks file is in Program Files x86 but it is not
Probably a way to fix this is by running a script while the shortcut must be selected...
If the target is in a UAC-protected folder, XY must be running with admin permissions^^
If the target is in a UAC-protected folder, XY must be running with admin permissions^^
Code: Select all
// https://www.xyplorer.com/xyfc/viewtopic.php?t=28168
// C:\Program Files (x86) | C:\Program Files | %ProgramW6432%
$vbsFile = "%TEMP%\~xy_replace_shortcut_path.vbs";
$replace = '%ProgramW6432%';
$vbsContent = <<<>>>
Option Explicit
Dim objShell
Dim objLink
Dim strLinkFile
Dim strFindText
Dim strReplaceText
Dim strNewTarget
Set objShell = CreateObject("WScript.Shell")
strLinkFile = WScript.Arguments(0)
strFindText = objShell.ExpandEnvironmentStrings("%ProgramFiles(x86)%")
strReplaceText = "$replace"
Set objLink = objShell.CreateShortcut(strLinkFile)
strNewTarget = Replace(objLink.TargetPath, strFindText, strReplaceText)
objLink.TargetPath = strNewTarget
objLink.Save
Set objLink = Nothing
Set objShell = Nothing
>>>;
if (exists($vbsFile) != 1) { $status = writefile($vbsFile, $vbsContent); }
$result = runret("""cscript.exe"" //Nologo ""$vbsFile"" ""<curitem>""", "%TEMP%", 65001);
if ($result) { text $result; }
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club