Running an Application

Welcome to BestSync Support Forum!
If you have any questions, comments, concerns, suggestion, please summit here, we'll try to reply you in short time.
Thank you!
Post Reply
tjblow
Posts: 70
Joined: Fri Mar 28, 2014 5:31 pm

Running an Application

Post by tjblow »

I am trying to run an application before synchronization, using Version Ver9.1.1.2(64Bit) . the Application is a powershell script that unzips the files from the archive into different directories per file type. Weather I run the script by powershell or create a dos batch to execute the powershell, the script can not "find" the Z:\ drive from within the BestSync Application tab.
If I run the powershell script natively or from dos with the batch file, the script runs just fine.
The script fails on the "test-path command -path z:\" as the path does not exist, yet it does. Why only when I run it from BestSync does the script not successfully locate the "z:\" drive.
Any logs I can look at to see what the error is.

Application tab info
d:\scritpfiles\call_uzbft.bat

Contents of Batch file:
@echo off
Set PSScriptPath=d:\scriptfiles\call_uzbft.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%PSScriptPath%""' -Verb Runas}";

Also ran file as just a powershell command:
c:\windows\system32\windows powershell\v1.0\powershell.exe
Arguments:
-File d:\scriptfiles\call_uzbft.ps1
tjblow
Posts: 70
Joined: Fri Mar 28, 2014 5:31 pm

Re: Running an Application

Post by tjblow »

Never mind I discovered the issue in the powershell script the shared drive was not available to the service running process.
Post Reply