joaobronze
New Member
- Joined
- Dec 6, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
After switching from Windows 7 to Windows 10, the script for extracting data, transforming it and uploading into database has stopped working. It gets stuck at part, which starts a bat file responsible for uploading a text file into the database. Error appears at line: oShell.Run
I've tried messing around in trust center settings to no avail. Some users reported that it might've been related to office 365 privacy settings (but haven't reported what specifically). The path is definitely correct, it works fine on Windows 7 computer. All drive mappings are exactly the same.
Any idea how to go about this or perhaps what to specifically look for in privacy settings or is it just Windows 10 that doesn't allow to run bat files that way anymore ?
Running the .bat file manually works fine.
VBA Code:
Sub Upload_to_ICW(ScrName As String)
Dim oShell As Object
Dim sPathScr
Set oShell = CreateObject("WScript.Shell")
sPathScr = "v:\path\"
oShell.Run Chr(34) & sPathScr & ScrName & ".bat" & Chr(34) & " " & Chr(34) & sPathScr & Chr(34), 2, True
End Sub
I've tried messing around in trust center settings to no avail. Some users reported that it might've been related to office 365 privacy settings (but haven't reported what specifically). The path is definitely correct, it works fine on Windows 7 computer. All drive mappings are exactly the same.
Any idea how to go about this or perhaps what to specifically look for in privacy settings or is it just Windows 10 that doesn't allow to run bat files that way anymore ?
Running the .bat file manually works fine.