I am trying to deploy a package on our Primary SMS/SCCM Server using a batch file (install.bat) that looks like below:
1. echo off
2. START /wait file://smsserver/SMSpackageshare/abc.exe /s
3. START /wait file://smsserver/SMSpackageshare/def.exe /s

The package runs great anytime that I specify full UNC path to each of my executables in the batch file but it fails when I try to rely on just specifying file://smsserver/SMSpackageshare as the working directory/start in directory on my package-program properties and change the batch file to below.

1. echo off
2. START /wait abc.exe /s
3. START /wait def.exe /s
the installation fails because my executables cannot be located: The installation process actually run out of package run-time looking for the sorce install files..

Now, I really the latter to work because we have several regional distribution poinst and its not expedient for machines at those regional sites to install this package using the central primary server package share. They need to get it from their regional distribution points

My only option at this point is to start to modify each batch files for each regions to reflect each regional distribution point package share but that will be a lot of work to do ..

I need a universal batch file that can locate install files at the local distribution point package share.

Is there any way to acheive this? Some kind of SMS server name/Package share variable to specify in the UNC path? We dont use VBS in my environment so that limits my option..
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2
Tried %~dp0?
Answered 03/06/2011 by: admaai
Orange Senior Belt

Please log in to comment
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
%~dp0 looks very much like what I need!...Thanks I will give it a shot
Answered 03/07/2011 by: zerville
Senior Yellow Belt

Please log in to comment
0
GEEZ and no points? tough crowd:)
Answered 03/07/2011 by: admaai
Orange Senior Belt

Please log in to comment
0
2 solid points Admaai!... thanks again..It worked
Answered 03/08/2011 by: zerville
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity