VS 2008 Getting Current User Folder?
Nov 6, 2009How would I get the current user's folder?Example:"C:Documents and SettingsOwner"
View 1 RepliesHow would I get the current user's folder?Example:"C:Documents and SettingsOwner"
View 1 RepliesBut I am trying to get to the Personl folder of the current user in windows 7. Now there are two special folders: MyDocuments and Personal However they both lead to C:Users{USERNAME}Documents Shouldn't Personal lead to one back from that?
View 3 RepliesI've been searching for a while, but it seems that I can't find an easy way to get the current user profile folder. I've tried "%userprofile%" environment variable, but it didn't worked (or I'm doing something wrong).How can I do it? I want to add the value to an string variable.
I actually tried something like: Dim Userfolder As String = %UserProfile%
I tried with quote marks too, but none seems to do the trick.What I'm missing?
How do I get the startup folder path for "Current user" and "All user" in VB.net?
View 2 RepliesHow to add folder to the current users mymusic folder during setup deployment?
View 2 RepliesI have a program load the saved folder (from last use) into a textbox, now, user click browse button, it launch the folder browse dialog, I can use selectedpath to set selected folder, but most of time, the folder is deep in the c:, so, the folder browser dialog window does not show it, user has to scroll down to find it.is there a way to automatically show the selected folder in the view?
View 2 RepliesI've been looking around for a way to check if the current user has Administrator rights but the information seems to be quite disperse and not exactly
View 3 RepliesI need to read the distinguished name of the current user (the one running the program) from Active Directory.I'm warm (I know I should use System. DirectoryServices and DirectorySearcher), but somehow I can't get the code to work properly, nor can I find a working example.Now, after having spent hours searching for examples on the internet, I'm getting quite frustrated with myself, so I turn to you hoping someone can provide an example.Why I need this: when people run this program, it needs to detect which OU they belong to. We have several sites (for example Rotterdam and Amsterdam) and depending on what site the user's OU is, I need to perform some actions. So I hope to derive f.e. "OU=Rotterdam" from their DN.
View 3 RepliesHow to get the User (Username) folder? I mean C:/Users/Username, D:/Users/Username or C:/Documents and Settings/Username ...Don't remeber exactly
View 2 RepliesI have a script that checks a version table from one mdb (server) and compares it to the same table in another mdb (user folder), if the version number is mismatched it needs to replace that file from the server, to the user folder. The problem is, how to get the OLEDB connection to the user folder since, the folder destination is
E:Configurator & UserName & Detail2004.mdb
How to set this up?
Here is my code:
Dim UserName As String = Environment.UserName.Substring(Environment.UserName.LastIndexOf("") + 1)
Dim connectionString2 As String = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=C:Configurator" & UserName & "Detail2004.mdb"
Dim con2 As New Data.OleDb.OleDbConnection(connectionString2)
Dim cmd2 As Data.OleDb.OleDbCommand
I am creating a VB .NET app that uses the user's Application Data to store data. Can an unprivileged user create a folder in the top level of their Application Data directory? I am trying to create the app's folder if it doesn't already exist for that user.
View 3 RepliesHow would i create and make a folder hidden from user?
View 3 RepliesI want to store my log files in the user's Application Data folder (to avoid all the hassle with Windows 7/Vista UAC permissions). By default, though, the app creates the folder structure like thisAppData/CompanyName/AssemblyName/AssemblyVersion/I just want a single folder without the AssemblyName and AssemblyVersion. Other than removing that info from the project, is there any other to just create a single
View 1 RepliesHow to know that if the current user is an administrator or normal user or guest?
And how to make the exe can just only run in administrator?
I have tried to set the .manifest to "<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />", but no use. Although I am not logged in as admin, I can still run the exe.
how to copy, delete, show files, show current directory, change directory, make folder, rename folder. My problem is i have a method on deleting a file and copying a file, but i don't know how to pass the method so that when i click the delete button it would let me choose what file to delete. By the way im using buttons on each function.[code...]
View 2 RepliesI need to know how to get the current exe folder, but how to do this? (So the folder where the exe is in).
View 2 RepliesBasically I am trying to enable the user the ability to select a folder and the folders music files populate a list box. I want two list boxes on the page, one with all the contents of the folder and then the other one for files selected from the first box. I have no clue on how to do this at all...
View 4 RepliesIn my application I have a several type of user could be log in. My purpose is to have a restriction with other menu to show on or off. In php I used a session to handle that user id. In vb.net how can assign user id and retrieve anytime I need it in every user that has been logged in, so that I can check the user type and do some action.
View 8 RepliesI would like to know how to create/add a folder when installing the application using the Setup and Deployment in VB.net.I have tried [TARGETDIR]\[USERNAME], but the target folder name that gets created seems its adding the Domain name\Username, and this is where it stops where it only created the folder with the Domain Name.
View 1 RepliesI am trying to create a folder with current date but getting error. Here is my code.
[Code]...
How can I have a Folder created with the Current Date and Time as iets Name and at the same time Save a Picture into that newly created Folder. Here is the code I am trying to get to work.
PictureBox1.Image = myCam.copyFrame _
(Me.PreViewPictureBox, New RectangleF(0, 0, Me.PreViewPictureBox.Width, Me.PreViewPictureBox.Height))
'<<< Creating New Folder and Saving Image to that Folder.>>>
If (PictureBox1.Image IsNot Nothing) Then
Dim NewFolder As DateTime = Now
[Code] .....
How do I know wich is the current folder of an App?? I mean... Is there a way to know where is the exe located from the running code?
View 5 RepliesI have been trying to create folders for database backup purposes. These folders were to be based on the current date and time as the name of the folder.[code]...
View 8 RepliesI would like to know how to create/add a folder when installing the application using the Setup and Deployment in VB.net.
I have tried [TARGETDIR][USERNAME], but the target folder name that gets created seems its adding the Domain nameUsername, and this is where it stops where it only created the folder with the Domain Name.
I have a program that creates folders with current date. I want to paste my files into folder that uses current date as name of the folder. My code below works great but i have to provide the folder name that the files will be paste into. How can i paste files into folder that uses current date as folder name?
Imports System.IO
Imports System.Xml.Linq
Module Module1
[Code].....
I want to ask, how to execute a file in current folder?I am Using Visual Basic Express Edition 2010
View 1 RepliesI'm trying to copy a file (pdftk.exe) from the Current Working Directory the VB.NET program is in.The file is to be copied to the Selected Path from the Folder Dialog Browser.I tried this code, but it seems it's not working
Imports System
Imports System.IO
Public Partial Class MainForm
[code].....
Im using Visual Studio 2008 This is my first program I renamed the program for the forum. If I remove the paths and execute my .exe from the AppDatalocal folder where the settings.ini file is it works fine, but I don't want have to run the program from there. I tried using %Username% for relative paths, but the computer can't follow the path. Do i have to write code to get the current username or how do programmers do this? Here's part of the program
[Code]...
im asking for help on how to Make Folder and it name by current Date?
sample today is 11-08-2011
so program will create a folder name 11-08-2011 (Nov.08,2011)
and also creation of folder triggered by timer lets say Folder creation every 11pm daily.
How can I do it so every time the user loads my application it will automatically (without prompt, or user selecting) upload all the files in a folder i select beforehand and add them into ListBox1
View 16 Replies