Solved

Better way than using a BAT file

Posted on 2008-06-19
9
178 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
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
 
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now