473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Including INI file in Services Deployment

Hi, Does anybody know how to include an INI file in the
deployment of a VB.NET service? I am able to package it
as a content file so that the INI file is installed along
with the other files into the chosen directory upon
installation of the MSI. However, when i execute my API
call to the INI from within the call... the call to the
current directory: Directory.GetCurrentDirectory
& "\filename.INI"... the current directory turns out to
be c:\windows\system32 which makes sense since this is a
windows service. However, since the INI is not in this
directory, this causes an error.
Does anyone know how to overcome this issue?
Thanks heaps,
Nov 20 '05 #1
1 1420
* "Igor" <iv***********@hotmail.com> scripsit:
Hi, Does anybody know how to include an INI file in the
deployment of a VB.NET service? I am able to package it
as a content file so that the INI file is installed along
with the other files into the chosen directory upon
installation of the MSI. However, when i execute my API
call to the INI from within the call... the call to the
current directory: Directory.GetCurrentDirectory
& "\filename.INI"... the current directory turns out to
be c:\windows\system32 which makes sense since this is a
windows service. However, since the INI is not in this
directory, this causes an error.


Maybe this works:

\\\
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
End Function
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: FrobinRobin | last post by:
Hi, I wonder if someone can help me, I've set my web site up as follows: There is a 'services' page that displays .html pages in a sub-dir when specified in the URL. I need use the switch...
7
by: Brian Sabolik | last post by:
I'm not sure if I've broken any Object Oriented rules or not, but ... I have projects in 2 different solutions that need to use each other's methods. Therefore I may have an "update" method in...
0
by: Brian Young | last post by:
My department is responsible for creating custom internal applications for many of our departments. Our strategy has always been to develop our applications as ActiveX controls (VB6) that get...
21
by: EmJayEm | last post by:
Can someone tell me the Disadvantages/Cons of web services? Thanks, EmJ.
1
by: Kirk Allen Evans | last post by:
I wanted to let you know about a fantastic webcast series focusing on web services technologies. From ASMX 2.0 to WSE 3.0 to WCF, there are some great sessions that you will want to check out. ...
5
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service...
6
by: Adam Clauss | last post by:
We have a service written in C#. The generated code "hardcodes" the service name into the exe. We have a situation where we would like to allow multiple Windows Services to be defined. These...
1
by: iscariot | last post by:
While deploying an app for estate management agents which I built, I backed up and included the mssql database in the deployment project (specifically in the Application folder of the File System...
1
by: mrpetegroups | last post by:
Hi - Problem: The file below has become zero length \winnt\assembly\GAC_MSIL\system.deployment\2.0.0.0_b03f5f7f11d50a3a \system.deployment.dll Details follow ... I've been programming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.