New Boundary Support Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

Deploying Batch FilesExpand / Collapse
Author
Message
Posted 4/13/2010 8:46:18 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/6/2010 3:03:36 PM
Posts: 11, Visits: 30
Is there a way to use Prism to deploy already made batch files?

If not, can I make a PTS to emulate a batch file?

Post #1857
Posted 4/13/2010 8:49:18 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2/12/2011 11:11:06 PM
Posts: 742, Visits: 1,211
You can easily use a Command Task to deploy out a batch file.  When building the Command Task, it just place the path to the .bat file in the "command line", and if your batch file requires any switches, place them in the "command options" field.



New Boundary Technologies Support
support@newboundary.com

Post #1858
Posted 4/13/2010 9:53:48 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/6/2010 3:03:36 PM
Posts: 11, Visits: 30
That didn't work out so well.  I have a self-contained batch file (does not require command options to work).  I placed the file in a network drive and browsed to it.  Made sure the path is correct.

When I assign it to a computer to run, the thing never runs.  Am I missing something (I guess I could be missing a lot of things but is there something common that you see normally)?

Post #1859
Posted 4/13/2010 10:05:11 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2/12/2011 11:11:06 PM
Posts: 742, Visits: 1,211
There are a few things that can mess up batch files being deployed. If you are running Vista or Windows 7 with the UAC turned on, then you will need to configure your command task to "run as local system".

There have also been some problems with a few commands such as Shutdown.exe and Dism.exe.  It is a known bug with those 2 executables, and the only way to get around them is to take them out of the batch file and run them as their own seperate command task.

These are the most common issues that customers have with running batch files.



New Boundary Technologies Support
support@newboundary.com

Post #1860
Posted 4/13/2010 10:35:40 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/6/2010 3:03:36 PM
Posts: 11, Visits: 30
Our machines are running XP.

I made the changes anyways and didn't see anychange.  I see the client checking in to the server, but the package doesn't run.  I verified that I had the package assigned to the computer as well.

The batch file is comprised of two other batch files - one to uninstall Project 2002 and the other to install Project 2007.  If I manually kick off the batch file, it runs fine.  I have another that will do the opposite - unintsall Project 2007 and install Project 2002.  So, I'm at the point where I am trying to get Prism to kick off the upgrade from 02 to 07.  But, I'm seeing no activity.

I tried putting in the \\server\group\file_path\ but that didn't do anything as well as using the drive letter.  I'm lost at this point - seems easy enough but I must be missing something.

Post #1861
Posted 4/13/2010 11:28:30 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2/12/2011 11:11:06 PM
Posts: 742, Visits: 1,211
In this sort of a scenario I would make configuration groups based on the existance of Project 2002, and then create a package to install Project 2007.  This would make the process much easier and allow for easier troubleshooting.

It seems like the nested batch files are going to be giving you any number of problems based on where they are located or what they are running. 



New Boundary Technologies Support
support@newboundary.com

Post #1862
Posted 4/13/2010 12:05:43 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/6/2010 3:03:36 PM
Posts: 11, Visits: 30
One would think that creating a configuration group would make this process easier to troubleshoot, but I would rather send that package to one test machine before sending it to the masses.  I really screwed up some machines not long after we got the software because I sent it out before testing.  Lesson learned!

But, me stating that this batch file is kicking off other batch files isn't necessarily correct.  The batch file is starting, running to the command prompt, and running .exe files to do an uninstall and install.  Prism doesn't look like it wants to kick it off at all.  I would think that Prism would just start the batch file and leave it alone after that.  Is this the case or no?

Post #1863
Posted 4/13/2010 12:14:50 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2/12/2011 11:11:06 PM
Posts: 742, Visits: 1,211
Would you be able to send us the .bat files you are using?  It's hard to really say what is causing this issue without looking at them.  Support@newboundary.com



New Boundary Technologies Support
support@newboundary.com

Post #1864
Posted 4/13/2010 3:38:37 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/6/2010 3:03:36 PM
Posts: 11, Visits: 30
So, creating a task with the path completely spelled out vice just the .exe files (expecting the environmental variables to apply)worked.

Now, is there a way to string those together (such as a script) so that I can make the uninstall task run first and then the install?

I know how to make a PTS out of packages, but is there a command to make the tasks run in order?

Thanks for your help!

Post #1868
Posted 4/13/2010 4:17:23 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/6/2010 3:03:36 PM
Posts: 11, Visits: 30
This is the script file I created to run them in order.

/Run "N:\Site\....(path to the executable)" /r           --> to uninstall

/Run "N:\Site\....(path to the executable" /i             --> to install

Seems to work well both ways so I'll stick with it unless you know of a more effecient way to run it.

Post #1869
« Prev Topic | Next Topic »

12»»

Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: New Boundary Support

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 3:09pm

Powered By InstantForum.NET v4.1.3 © 2012
Execution: 0.203. 9 queries. Compression Enabled.