Solved

Better way than using a BAT file

Posted on 2008-06-19
9
185 Views
Last Modified: 2010-04-16
I use a BAT file that runs from a share drive to set the security using caspol. After I make the security change, I run setup to update the client to NET 2.0 and place an ICON on the desktop to execute an application on the share drive. Is there a more elegant way to accomplish the same thing without using a BAT file? THe application is and setup are VB.NET 2005.
0
Comment
Question by:Mr_Fulano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 9

Expert Comment

by:djon2003
ID: 21828379
My way would be to build an installation program that would do security setup & file copy.
0
 
LVL 2

Expert Comment

by:j0rdan
ID: 21828666
WSH (Windows Scripting Host) could probably do most of this, though it'd be as trivial as a batch file. You'd have more access to Windows-specific functions, though.

It's what I use for login scripts in place of batch files (for whatever Group Policy can't handle).
0
 
LVL 7

Expert Comment

by:Dauhee
ID: 21830607
how about using .NET publish features - you can set it for offline compatibility so it will be available even when the published location (web server) is not available. Best of all you won't have to write a line of code and can push out later versions just by republishing :)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:Dauhee
ID: 21830693
Oh meant to say by publishing you won't be dependant on network drive (they have a tendancy to go down when least expected :) ) and no need for changing policies . .
0
 

Author Comment

by:Mr_Fulano
ID: 21838140
DJon2003, when you say..."My way would be to build an installation program that would do security setup & file copy", how would you do that? In other words, what would your program do in terms of the security setup? Remember, I use a BAT file that runs from a >>share drive<< to set the security using caspol.

Can you provide a more detailed explanation?

Thanks,
Fulano
0
 

Author Comment

by:Mr_Fulano
ID: 21838154
Dauhee, I'm not sure that .NET publish features would help. Could you give a more detailed example of how that would replace my BAT file.

Keep in mind, I'd really like to use an installation program, but the trick is running the install from a shared drive, where I do not know what drive that will be at design time.

In my scenario, the user wishing to use the shared application from their client would connect to the shared drive (which I do not know at design-time where that is), click on an install application and then it would change the Caspol security setting on >>their<<, machine.

Any examples would be greatly appreciated!

Thanks,
Fulano

 
0
 
LVL 7

Accepted Solution

by:
Dauhee earned 500 total points
ID: 21838168
There are different ways to do it but I believe its called clickonce deployment. Here is one method:

http://www.codeproject.com/KB/install/QuickClickOnceArticle.aspx
0
 

Author Comment

by:Mr_Fulano
ID: 21880621
Dauhee, sorry for the delay. I actually converted the BAT file into an EXE with BAT2EXE. It works OK for now, but I will take your suggestions into consideration for future improvements.

Thanks,
Fulano
0
 
LVL 7

Expert Comment

by:Dauhee
ID: 21881421
No problem many thanks :)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question