.NET Framework - dll paths
Asked By DaveP
05-Oct-07 07:03 PM
in the app config...how can i tell my app where dll's are
without registering them
Thanks
DaveP
Xmen40NOSPAM
(1)
DLLs
(1)
Directory
(1)
Forumid
(1)
Alaaaj
(1)
NOSPAM
(1)
Paths
(1)
Husam
(1)
HusamAlAara replied...
hi,
try this:
http://www.codeproject.com/cs/files/custom_config_file_reader.asp?df=100&forumid=24017&exp=0&select=1912477
husam alaaaj
www.aaraj.net
Andreas Mueller replied...
If the DLLs are located under the applications base directory, you can
extend the probing path via the app.config file:
http://tinyurl.com/29svah
HTH,
Andy
--
You can email me by removing the NOSPAM parts below:
xmen40NOSPAM@gmxNOSPAM.net
DaveP replied...

1) WMIObject (1) GetAccessControl (1) DeviceID (1) WinRM (1) CodecreateorPS (1) GetDirectories (1) So the directory structure is d: \ something \ update or can update be deeper like d: \ something \ something \ deeper com / mvp PowerGadgets MVP http: / / www.powergadgets.com / mvp Blog: http: / / marcoshaw.blogspot.com The directory structure is d: \ something \ update LogParser ? I've ctp v2 of powershell . . .do i need admin rights on the remote machine $permission = 3D Get-ACL -Path "DIR_TO_COPY_PERMMISSIONS_FROM" $comp = 3D "COMPUTERYOUNEEDTOCLEAN" $directory = 3D Get-WMIObject -ComputerName $comp -Query {SELECT DeviceID FROM Win32_LogicalDisk WHERE DriveType = 3D'3'} | Select DeviceID | Foreach-Object {$_.DeviceID.Replace(":", "$")} | Foreach- Object{[System.IO.Directory]::GetDirectories(" \ $comp \ $_")} | Where- Object {!$_.Contains("System Volume Information")} | Foreach-Object{$_, [System.IO Directory]::GetDirectories("$_", "UPDATE", [System.IO.SearchOption]::AllDirectories)} | Foreach- Object{[System.IO.Directory]::GetParent($_)} $directory | Foreach-Object {$_.GetAccessControl().setowner($permission.GetOwner([System.Security.Princ = ipal.NTAccount]))} foreach($dir in $directory) {Set-Acl $dir -AclObject $permission} $directory | Foreach-Object {del $_.FullName -Whatif} Hope that helps
ASPNET account 2008-05-07 09:21:10 Starting Getting location of Temporary ASP.Net directory 2008-05-07 09:21:10 Success Getting location of Temporary ASP.Net directory 2008-05-07 09:21:10 Starting Setting ACLs on Temporary ASP.Net directory 2008-05-07 09:21:10 Failure Setting ACLs on Temporary ASP.Net directory: SetACLOnDir failed with HRESULT 80070005: 'Access is denied. ' 2008-05-07 09:21:10 Starting Setting ACLs on install root directory 2008-05-07 09:21:11 Failure Setting ACLs on install root directory: SetACLOnDir failed with HRESULT 80070005: 'Access is denied. ' 2008-05-07 09:21:11 Starting Setting ACLs on config directory 2008-05-07 09:21:11 Failure Setting ACLs on config directory: SetACLOnDir failed with HRESULT 80070005: 'Access is denied. ' 2008-05-07 09:21:11 Failure
Move files to a directory .NET Framework Hi everybody, i've got one file which contains a complete path file item -path $i -destination C: \ move} What I can do for create the same source directory into destination directory ? If anyone can help me. . . Thanks. . . Powershell Discussions PSParentPath.Replace (1) PsParentPath.EndsWith (1) PSPath DirectoryName.Replace("$($item.PSDrive): \ ", "C: \ move \ ") if (-not $(Test-Path -LiteralPath $destinationPath)) { New-Item -ItemType Directory -Path $destinationPath | Out-Null } $item | Move-Item -Destination $destinationPath } - - Kirk Munro Poshoholic http: / / poshoholic.com is OK Can you explain me : if (-not $(Test-Path -LiteralPath $destinationPath)) { New-Item -ItemType Directory -Path $destinationPath | Out-Null" My script does not return good results. I have decided to the destination path; pipe the results to null to suppress the output New-Item -ItemType Directory -Path $destinationPath | Out-Null } # move the file from the source to the destination $item | Move the destination path; pipe the results to null to suppress the output New-Item -ItemType Directory -Path $destinationPath | Out-Null } # move the file from the source to the destination $item | Move the destination path; pipe the results to null to suppress the output New-Item -ItemType Directory -Path $destinationPath | Out-Null } # move the file from the source to the destination $_ | Move
wanted to write a class to encapsulate an enumeration of all the files in a directory. I could just use Directory.GetFiles(directoryPath, "*.*", SearchOptions.SearchOption.AllDirectories); but when hundreds of files are involved and the directory is on a remote server this causes a substantial delay, so I wanted to design an enumeration that would browse through the root directory and its subdirectories incrementally as iteration took place. So I tried this, having read up string> { public string Root { get; private set; } public string Current { get { foreach (string file in Directory.GetFiles(Root)) { yield return file; } foreach (string subdirectory in Directory.GetDirectories(Root, "*.*", SearchOption.AllDirectories)) { foreach (string file in Directory.GetFiles(subdirectory)) { yield return file; } } yield break; } } } But this produces a compiler error, because "The string> ! Well, that stinks. I can imagine wanting to retrieve all the files in a directory in this manner in a variety of applications, and I would like to encapsulate in
2.0 Delete"); } } private void makedir (string dirName) { / * string dir = dirName.Replace(' / ', ' \ '); dir = "H: \ " + dir; Directory.CreateDirectory(dir); return; * / / / MessageBox.Show("In makedir."); FtpWebRequest reqFTP; try { / / dirName = name of the directory to create. reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp: / / " + F1.FTPserver + " / " + dirName)); reqFTP.Method = WebRequestMethods Stream ftpStream = response.GetResponseStream(); ftpStream.Close(); response.Close(); } catch (Exception ex) { / / MessageBox.Show(ex.Message, " Directory fout"); } } private void btnAnnuleer_Click (object sender, EventArgs e) { this.Close(); } private void btnStart_Click (object sender Mappen); / / string[] bestanden = GetFileList(); } lblBestand.Text = "Klaar met uploaden."; this.Refresh(); } public void schrijfNaarWeb (string directory) { if (!Directory.Exists(directory)) { throw new FileNotFoundException("De map bestaat niet. " + directory); } try { string[] files = Directory.GetFiles(directory); foreach (string file in files) { if (file ! = null) { string copyfrom = file; string copyto