473,388 Members | 1,375 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,388 software developers and data experts.

Changing the default path of a windows service

RMB
Environment: VS.Net 2003 FW 1.1 VB.Net

I have an application that uses reflection to load external assemblies. The
external assemblies reside in the same folder as the application exe. When I
run the application as a normal windows application, the external assemblies
are loaded just fine. When I run the application as a windows service, the
application expects the assemblies to be in the windows\system32 directory.

How can I change the assembly search path to look in the same directory as
the application exe and not windows\system32?
Thanks for the help...
Sep 8 '06 #1
1 5942
"RMB" <RM*@discussions.microsoft.comwrote in message
news:93**********************************@microsof t.com...
Environment: VS.Net 2003 FW 1.1 VB.Net

I have an application that uses reflection to load external assemblies.
The
external assemblies reside in the same folder as the application exe. When
I
run the application as a normal windows application, the external
assemblies
are loaded just fine. When I run the application as a windows service,
the
application expects the assemblies to be in the windows\system32
directory.

How can I change the assembly search path to look in the same directory as
the application exe and not windows\system32?
System.Environment.CurrentDirectory =
System.AppDomain.CurrentDomain.BaseDirectory;

Sep 9 '06 #2

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

Similar topics

1
by: bob | last post by:
I have created a simple Windows service in VB.Net which installs fine using InstallUtil.exe to install it to, for example "c:\test", or "c:\Windows\YellowBanana", but if I install it to "c:\Program...
6
by: Laszlo Zsolt Nagy | last post by:
Sorry, I realized that the import zlib was not executed from my (working) service. So here is the question: why can't I use zlib from a win32 service? Is there any way to make it working? ...
1
by: Dalan | last post by:
To avoid having potential conflicts and problems with different versions of Common Dialogs Controls, I have decided to change the ones I have used to API calls; however, this is somewhat new...
4
by: Jim | last post by:
I am writing a Windows Service in VB.Net, and right upfront I need to pass the path to my config.xml file to the constructor of the class which reads it. In the old days, App.Path & "\config.xml"...
5
by: pb | last post by:
Do anyone know how to change the .aspx extension to something else, say ..sssx, for all or part of a ASP.NET 2.0 site? I recall a Microsoft article on this some time ago, but I cannot locate it.
4
by: Gav | last post by:
Hi all, I have written a program which seriously depends on an environment variable. When I set the env var for the system it caused me major problems unrelated to what I was trying to achieve....
2
by: Ronald | last post by:
I just started with dotnetnuke, and with a wrong login (wrong password on a clean install i can crash the application pool from IIS. (when i login with the right username/password information the...
12
by: Anil Gupte | last post by:
I wrote my Windows Service first as a regular Windows Exe because it is easier to debug. In that I used AppDir = Application.ExecutablePath.Substring(0,...
10
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, I'm trying to use the new VB 2008 right now and I want to know how to preset the company name and copyright informtion in Assembly Information. In my current VB 2005, company name...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.