Line: 58
Char: 4
Error: Permission denied
Image: https://i.postimg.cc/vTCP195f/image.png
But the files were updated.

Moderators: Hacker, petermad, Stefan2, white
*%$System%\wscript.exe "%COMMANDER_PATH%\Scripts\UpdateFilesInTargetTree.vbs" |
Code: Select all
Option Explicit: D = "S:\" ' drive selection
Dim oFSO, TPath, Once, c, D
Set oFSO = CreateObject("Scripting.FileSystemObject")
If Len(D) > 3 Then TPath = "\\.\" & D: Once = 1 Else TPath = D
Recursion oFSO.GetFolder(TPath)
If IsEmpty(c) Then MsgBox "The check was successful!", 262208
Sub Recursion(oDir)
If IsEmpty(Once) Then If Len(oDir.Path) > 3 Then _
Set oDir = oFSO.GetFolder("\\.\" & oDir.Path): Once = 1
On Error Resume Next
For Each D in oDir.SubFolders: Recursion D: Next
If Err.Number <> 0 Then c = 1:_
MsgBox oDir.Path & vbLf & Err.Description, 262192: WSH.Quit
On Error GoTo 0
End Sub
I have UAC totally disabled.Fla$her wrote: 2023-11-28, 04:35 UTC If you have UAC enabled, then the profile doesn't matter. I'm writing about an elevation run.
If you mean in the TC's window titlebar, no.Fla$her wrote: 2023-11-28, 04:35 UTCIs there a '^' sign in the TC header? Is AlwaysAsAdmin=1 in the [Configuration] section ?
That opens a terminal window from the TC command line.
As far as I can see nothing happens when I run that .vbs, either from a terminal window, from TC's command line or from a toolbar button. I don't see any window opening or any message.Fla$her wrote: 2023-11-28, 04:35 UTCLet's localize the problem. What will appear if such a code is executed by Enter? —
Understood.
Task Manager processes don't have wscript.exe?
It shows up in task manager for like 2-3 seconds and then disappears.
Code: Select all
Option Explicit: D = "S:\" ' drive selection
Dim oFSO, TPath, Once, c, D
Set oFSO = CreateObject("Scripting.FileSystemObject")
If Len(D) > 3 Then TPath = "\\.\" & D: Once = 1 Else TPath = D
On Error Resume Next
Recursion oFSO.GetFolder(TPath)
If IsEmpty(c) Then MsgBox "The check was successful!", 262208
Sub Recursion(oDir)
If IsEmpty(Once) Then If Len(oDir.Path) > 3 Then _
Set oDir = oFSO.GetFolder("\\.\" & oDir.Path): Once = 1
For Each D in oDir.SubFolders: Recursion D: Next
If Err.Number <> 0 Then c = 1:_
MsgBox oDir.Path & vbLf & Err.Description, 262192: WSH.Quit
End Sub