Wscript not found error in Gallery
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
I am about to migrate my workflow to the gallery. This uses the event triggers to run a macro that should download files from sharepoint before the workflow starts. It works when ran on my machine but when put in the gallery, I get an error that the script file cannot be found.
Note: I have all my working files in a shared network drive. Here is the code I have for the vbscript:
Option Explicit
Dim objExcel
Dim CurrentDirectory
dim fso: set fso = CreateObject("Scripting.FileSystemObject")
CurrentDirectory = fso.GetAbsolutePathName(".")
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'"&CurrentDirectory&"\MacrosForICRecon.xlsm'!Module3.getHostFolder"
objExcel.DisplayAlerts = False
objExcel.Application.Quit
Set objExcel = Nothing
WScript.Quit
And here is how I configured the event:
Appreciate any help given.
Kat
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KMadamba
If your .vbs file can't be found, make sure that the service account that runs the gallery has access to the network share.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @danilang , thanks for your response.
The service account does have access to the network folder.. it turns out that I was getting the "not found" error because the wscript.exe was not in the folder. So, I copied the exe file in the folder and now receiving a timeout error.
This script should only take about 30 seconds but I adjusted it to 300 seconds just to give it enough time. Unfortunately, it still timeouts.
It seems to me that the script does not work when ran on the Gallery.. is running a wscript in the server a limitation?
Thanks,
Kat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KMadamba
In general, running a wscript on the server is allowed. The problem may be with what you're trying to do in the script.
You're using server side Office Automation which is something that Microsoft doesn't recommend. The article mentions several ways that the process could break. Look in to this more
Dan
