Solved

Better way than using a BAT file

Posted on 2008-06-19
9
184 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
learn programming 8 66
Hide file extensions in Notepad++ tabs 2 46
Need help with a query 3 37
MySQL programmer starter 25 20
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.

740 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