I am trying to deploy an application through a .bat via SCCM. The .bat executes perfectly when I run it on my local workstation via CMD. When I deploy it and try to install it via Software Center, it says it can't find the .exe. How do I specify it should look in the same directory location as the .bat file?
Here's what I've written up:
@echo off
REM Install VooV
start VooVMeeting.exe /S
REM Create Shortcut
set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
echo sLinkFile = "C:\Users\%USERNAME%\Desktop\VooV Meeting.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
echo oLink.TargetPath = "C:\Program Files (x86)\Tencent\VooVMeeting\voovmeetingapp_new.exe" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%
cscript /nologo %SCRIPT%
del %SCRIPT%
REM Sleep Script
timeout /t 30 /nobreak>NUL
REM Send Exit Code
EXIT /B 0
I feel like this is a simple fix but I am too stupid to figure it out. Thanks for any pointers.