Cannot Find Application Data Directory
Dec 7, 2009I have a vb.net program that initially finds the directory where application data can be stored with the following command.[code]....
View 4 RepliesI have a vb.net program that initially finds the directory where application data can be stored with the following command.[code]....
View 4 RepliesI have started working on the module based application (plugin based architecture) and client want setup of module that can be run later and added automatically in main application. So, what I am thinking to apply in module setup project is to find the installation directory of main application and then paste dll of module in specific sub-directory.
Is it possible? Is there any other way to add feature in main application later using setup?
the application is used to find a given file name in a given file directory and put messages to remind user at a given time.
View 2 RepliesI am trying to deploy my first application using vb. I have tried to use the one click but here is my problem.
I have a group of data files, some *.txt and one access data base (*.dbf) that I need to have placed in a folder (that is created) located at c:monitor.
how to do it in either the one-click or in a setup project.
I would also like to have a condition that if the files exist that they are not overwritten with an updated installation.
I'm trying to find a good strategy to access data files, image files, etc., that I want to distribute in my VB.NET deployment. The challenge I'm having is to find a place to put the files, and a means for the program to find them, regardless of whether the program is running in the Visual Studio environment as a debug build or release build, or running as an installed application.I've considered using AppDomain.CurrentDomain.BaseDirectory to find the location of the EXE file, then using relative paths to that folder. However, that approach depends on the directory hierarchy imposed by the Visual Studio tools when it separates the binaries of debug and release builds. Both builds would have to navigate upward to reach a common root folder, and the path traversal algorithm must work for the deployed EXE file too.
View 6 Replieshow to find data using search command in my form application like searching a name in my database?
View 1 RepliesI need to get the location/name of the directory that contains my application. I know I can get location of my app using My.Application.Info.DirectoryPath but I don't know how to get the directory above this. I can of course mess around with String.Split etc.. but I don't think that is necessary.
View 3 RepliesI've written an application [Visual Studio 2005 / VB) that works fine when I build it on my Win 7 PC.But when I try to install it XP as a test it falls over imediately on a 'file.exists' call made to establish if the data file exists or not (and if not then create it).
But it raises an exception because it can't find the directory that the file is supposed to be in. For the files location I was using Application.ExecutablePath but on the XP machine it is some weird directory like
Code:
[Code]...
I'm trying to look in the program files for a directory(the gimp directory). I could hard code it but they change the file name and the exe name with the versions. So I only know that the folder contains the word gimp. How do I search for it only knowing a portion of the file name.
My.Computer.FileSystem.FindInFiles(Environment.SpecialFolder.ProgramFilesX86, "gimp", True, FileIO.SearchOption.SearchTopLevelOnly)
This is the code that I've tried but it just doesn't work.
I've been trying to find the size of a directory with vb.net but not having much luck. I've tried things like: My.Computer.FileSystem.GetDirectoryInfo(basePath). but no appropriate methods or properties are coming up.
View 14 Repliesi am trying to use code to find search for a folder and it will give me back the full directory root. I am using this code:
[Code]...
I am trying to find out the Active Directory Group that the current user belongs to. I have the current users username stored in strUserName and have got this [code]....
View 4 Repliesi want to get path of current directory .
View 2 RepliesGiven that I have a file in path: C:ApplicationsGeneral UtilsAssembly1Assembly1BinDebugAssembly1.dll
and I am working in the following path:C:ApplicationsUnder DevelopmentApp1App1
is there some easy way to find the dotted path route from the application to the assembly:
General UtilsAssembly1Assembly1BinDebugAssembly1.dll
I'm making a Cleaner for my PC that could delete all files with a specific name.So I have all the names in a .txt file, like:
A
B
C
D
Now I need somekind of function that would search in a directory ( The user gives the dir. in a textbox ), and its important that it would also search in all sub folders and see if there is a match to any of the names in the .txt file. And it shall not care about in what format the file is. It can be in .exe , .txt or any format.
i am using following code to retive Domain Users from AD
but i am getting APPUser and IUSER in the give
how to avoide this type of user from the list i wantreal user names only
Dim pctx As New PrincipalContext(ContextType.Domain, "192.1.1.1", "myusername", "mypwd")
Dim grp As GroupPrincipal = GroupPrincipal.FindByIdentity(pctx,
[Code]....
I am trying to get the next available computer name based on a pre/sub fix e.g. "PC0001", atm I have a working solution from sql asset database.Anyone got an idea on how to convert the following from sql query to directorysearcher.filter?"Select TOP 1 Computername from computers where Computername LIKE '" & computerNamePrefix & "%' AND ISNUMERIC(right(ComputerName,4)) = 1 ORDER BY Computername DESC"At the moment I got the following
mySearcher.Filter = "(cn=*pc*)" mySearcher.Sort = New SortOption("Name", SortDirection.Descending)
I'm trying to load the most recent file from a directory, but my following code doesn't work. Am i getting something obvious terribly wrong?!
Dim myFile = Directory.GetFiles("C:UsersJoeDesktopXML Logs").OrderByDescending(Function(f) f.LastWriteTime).First()
I get two error messages:
Data type(s) of the type parameter(s) in extension method 'Public Function OrderByDescending(Of TKey)(keySelector As System.Func(Of String, TKey)) As System.Linq.IOrderedEnumerable(Of String)' defined in 'System.Linq.Enumerable' cannot be inferred from these arguments. Specifying the data type(s) explicitly might correct this error.
And:
'LastWriteTime' is not a member of 'String'.
I am trying to publish a project. Via the publish wizard I have published the project. So I have:Project.applicationSetup.exeand a directory application files in which:Project.applicationProject.exe.deployProject.exe.manifest. When I start the setup it does it's thing (only one question: do you want to install ...etc) and 2 seconds later its done.
Problem:
1. I can't find the installation directory... (I can find the app in the 'add/remove programs' but not anywhere in program files or ..)
2. there are a few xml and mdb files I want to include in de project (or else the project does not work).
But because of (1) I don't know where to do so. Or beter yet, I would like to include these files in the installer.3. Why doesn't the installer ask me where I want to install?
Our organization has users that have similar first and last names, but different users ID. How do I search the Active Directory to find all the users?
View 1 Repliesim an amateur programmer making a program for somebody else. i need to get it to run out of the box no problems and i need to find a way to automatically find the desktop for xp but it would be nice if the same code worked on vista/7 to but thats only if its convenient.
View 4 RepliesI am using Active Directory to authenticate users for an intranet site. I would like to refine the users that are authenticated based on the group they are in in Active Directory. how to find what groups a user is in in ASP.NET 4.0 (VB)?
View 3 RepliesI am trying to write a simple Visual Basic 2008 installer that copies word macro templates to Word's startup directory. On Vista and 7, that directory is the user's AppDataRoamingMicrosoftWordSTARTUP directory. Is there a way that I can programmatically find this directory? I.e. is it safe to say that this directory will almost always be in this location such that I can simply get the user's home directory and then add AppDataetc.... or is there a registry or something else that I can access to get Word's current standard startup directory?
View 1 Replieshow to find out what Active Directory groups a user belongs to? I already have the code finding out their username but now I need to find out what group they belong to so I can assign the relevant photocopier code.
View 1 RepliesIn html it's easy to get a button to get an file on your local hard drive but I can't seem to find or remember how to do it for a VB application (using Visual Basic 2010). What I would like is for the button to find a local directory, select it and then add the address to a textbox.
View 1 RepliesI have a fairly straight forward peice of code that just tries to set the default saved directory for a standard .net save dialogue to a specific folder. If that folder doesn't exist, it sets it to the desktop. This works fine for everyone but one user who is getting the following error: Could not find special directory 'Desktop' How is that even possible?
[Code]....
I have a process serves as an application updater.It checks it's local cache of files and compares this against list of files online.On it's first run there are no files in the local cache and it therefore downloads ~100 of these files.[code]This appears to work very well, since Explorer confirms that all files are extracted and available.However when I later run this process again, it cannot verify the existence of 6 of these files and therefore tries to download them despite the fact that they are clearly both present and up to date.The offending code is a simple File.Exists call which appears to deny the local existence of these files, and therefore tries to get them again.The system continues to work well, but over time the continual downloading of these 6 files is going to get kind of silly.
View 1 RepliesI am working on writing a very simple application for work. We have a network drive with several folders. I need to select a directory and then develop a list of all the directories and their paths. For this I am using VB Forms. I have added a ComboBox but then what control do I use to select the directory? I do not see any controls in the toolbox (like the little icons that show up to create a new directory and such).
View 4 RepliesI need to get the path (not the executable) where my application is running from:System.AppDomain.CurrentDomain.BaseDirectory()
View 3 Repliesbacking up an excel database in my application i used...This..
Dim partdb As String = My.Application.Info.DirectoryPath
FileCopy(partdb & "part.accdb", "part.bak")
this copies the backup file to the root of my c:.Whats the correct way to file copy within the application directory?