Installing Software Remotely from DS
Ok so we're moving out to all of our remote sites now and would like to be able to send software installs as jobs from the DS. Now as some of these packages are quite large, we'd like to run the install from a local server. Kind of the idea of a package server with the NS. What would be the best way to accomplish this? We're thinking machines locally and then creating jobs that would point the clients to that machine. So create jobs by region, ie Canada, US, UK and then when creating that job point it to that local server. Is there recommendations or specific configuration that would be required? I see PXE servers but we are not imaging at the moment, we are literally just deploying software like Acrobat, Office etc.
Thanks
Scripts
We basically do what you are attempting to do here.
I run a script that determines the subnet and then connects to the local server and share (batch file).
See below for an example.
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| find "IP Address"') do set IP=%%a
for /f "tokens=3 delims=." %%j in ('echo %IP%') do set SUBNET=%%j
if %SUBNET%==1 goto LOCATION1
if %SUBNET%==2 goto LOCATION2
GOTO FAIL
:LOCATION1
set server=\\localserver1
goto MAP
:LOCATION2
set server=\\localserver2
goto MAP
:MAP
net use %SERVER%\share
INSERT REST OF YOUR SCRIPT HERE
goto END
:FAIL
echo No local server found for this subnet
:END
What we do...
Ok so this is what we have
3 "Package" Servers (A,B,C)
Replicate packages to all 3
There is drives mapped to each server on the local DS (ie. L = \\europe\package M= \\northamerica\package N = \\southamerica\package)
Then we create jobs by zone, so if it's a job for UK the job would point to L:\\office2007, if it's for Canada it would point to M:\Acrobat8Std
Now the problem is, if I deploy a job locally, let's say Acrobat, it takes 3 minutes, if I deploy a job in UK exact same package, but pointing to different server, it takes 1 hr and 45 min
Wondering if I may be missing something there?
It sounds as if...
It basically sounds as if it is not using the package servers and is deploying directly from the DS (which is not what you are looking for). The script that posted above (provided you know what the subnets of each location are up front) will open a connection to the local server (i.e. if your subnet 192.168.2.x is in Canada, then it would jump to that location in the script and execute the mapping to the Canada server). After that you would have to add to the script to execute the software you are looking to deploy from that location which would be "%SERVER%\share\path.to.software.package\package". If it is an msi package you can utilize MSIEXEC to launch it from that location and add the appropriate switches (i.e. /qn).
I never really got "package servers" to work well here and came up with this work around. I would imagine there is probably a better way of doing it, and believe me, I am open to easier suggestions, but until then, that script works well for me and I don't have anyone screaming at me to burning up the bandwidth on the WAN.
I should also clarify the script above. It is taking the third quad. of the IP. For example, if your IP is 192.168.1.23, it will say your subnet is "1".
That's what we figured....
There's no way it should take that long if going from a local server. Frustrating as the functionality is so readily available on the NS and yet there is nothing like it on the DS. I'll give the script a shot. I'll be a ton of work as we have a ton of subnets and I'd rather not go there. But would love to hear from anyone else as well if they've found another work around.
Thanks bhawver!
A suggestion
We have quite a few subnets as well (about 60-70 active subnets). I would suggest that you only use the one script instead of copying it otherwise as subnets change or other items change you would have to modify every copy.
Also, only utilize the subnets that you are actively working with. For example if you have a VoIP or wireless subnet, you may not want to include these as you may not want to be pushing software through these mediums. This will lessen the administrative load when dealing with a ton of subnets.
DFS shares
If all the servers are on the same domain it might be easier to use DFS shares. This will allow you to use the same address for every install in the DS. So \\domain\software\adobe\setup.exe could be run from every computer as long as the DFS is set up for each site. That is what we use and it makes software installs extreamly easy. No need for scripts or conditions to figure out the location. If you have an updated domain structure (2003+) then you can even set up replication so each DFS contains all the same software in the same structure.
DFS
I tried using DFS (not only for this but for regular file shares) and found that there were times that users were still coming across the WAN. I couldn't guarantee that everytime a user connected they would connect to the right server, this is what prompted me to use subnet scripting. I'm sure there is a misconfiguration somewhere here.
Interesting...
Not sure I get the gist of it, could you go into more detail though?
Thanks!
I've got a very similar script working fine for me, however...
I would like to turn the script into a subroutine I can call from the jobs. Is anybody aware of a way of doing this in DS? If you can subroutine the calculation of the subnet then when subnet changes occurr you only have to edit one subroutine and not every deployment job!... Which is not fun...
Sorry, and example of the script that works out the subnet...
echo "%#!computer_display@ip_address%" > c:\site.txt
type c:\site.txt|find "n.n."
if NOT ERRORLEVEL 1 goto <section in script to map package server>
<section in script to map package server>
SET Pkg_Server=localpackageserver
del c:\site.txt
goto install
It's not as elegant as bhawver's script (I'll look at making that improvement later) but it works OK for me for now.
If anybody knows of a way we could set the subnet calculation script to be accessible from the job as a subroutine, I'm sure this would help a lot of us using DS for application deployment.
Sorry, moving to NS/DS 7 is not an option, yet...
Batch file
You might place the script you identified earlier in a location that all can access and then call that batch file from active script. That way you only have to maintain one site mapping script.
Would you like to reply?
Login or Register to post your comment.