Solved

How to specify the path to a script within aa vb.net windows app

Posted on 2006-11-30
1
213 Views
Last Modified: 2010-04-23
I have a windows app that will reside on a server in a folder called executables.  The executable needs to access a script that is in a folder called scripts.  Scripts and executables are level with each other.  Running from my desktop the path might look something like c:\\scripts\script.cmd.  What would it be from the server?

Users will have a shortcut on their desktop that will execute the server program and bring up a screen.  They will write a file created in part by their userid (to insure unique).  How can I direct the file to their desktop?  
0
Comment
Question by:garyinmiami2003
[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
1 Comment
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 500 total points
ID: 18049330
ok let me just clarify the question.

you have an application that will be stored on a network drive? Users have a shortcut to the network location so they can run the exe from the network drive.

the application needs to find the script file on the network drive that is in a folder at the same level as the folder that contains the exe file.





you can find out the directory an application was run from using application.startuppath, which should yield something like "x:\executables" then you could just do a replace to change the folder to scripts.

eg

dim path as string = application.startuppath
path = path.Replace("\executables", "\scripts") & "\script.cmd"

then open the script file using the path

is that the sort of thing you are after?
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

624 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