Search Results

Search found 4472 results on 179 pages for 'vb'.

Page 108/179 | < Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >

  • VBScript Issue Help Required.

    - by MalsiaPro
    I need a script that can run and pull information from any drive on a Windows operating system (Windows Server 2003), listing all files and folders which contain the following fields: The server is quite big and is within our domain. The required information is: Full file path (e.g. C:\Documents and Settings\user\My Documents\testPage.doc) File type (e.g. word document, spreadsheet, database etc) Size When Created When last modified When last accessed Also the script will need to convert that data to a CSV file, which later on I can modify and process in Excel. I can imagine that this data will be huge but I still need it. I am logged in as an administrator on the server and the script will need to also process protected files. As in previous posts I have read that the script will stop if such files are processed. I need to make sure that not a single file is skipped. Please note I have asked this question before but still have not got a working script. This is the script I got so far, file Test.vbs: Set objFS=CreateObject("Scripting.FileSystemObject") WScript.Echo Chr(34) & "Full Path" &_ Chr(34) & "," & Chr(34) & "File Size" &_ Chr(34) & "," & Chr(34) & "File Date modified" &_ Chr(34) & "," & Chr(34) & "File Date Created" &_ Chr(34) & "," & Chr(34) & "File Date Accessed" & Chr(34) Set objArgs = WScript.Arguments strFolder = objArgs(0) Set objFolder = objFS.GetFolder(strFolder) Go (objFolder) Sub Go(objDIR) If objDIR <> "\System Volume Information" Then For Each eFolder in objDIR.SubFolders Go eFolder Next End If For Each strFile In objDIR.Files WScript.Echo Chr(34) & strFile.Path & Chr(34) & "," &_ Chr(34) & strFile.Size & Chr(34) & "," &_ Chr(34) & strFile.DateLastModified & Chr(34) & "," &_ Chr(34) & strFile.DateCreated & Chr(34) & "," &_ Chr(34) & strFile.DateLastAccessed & Chr(34) Next End Sub I am currently using the command-line to run it: c:\test> cscript //nologo Test.vbs "c:\" > "C:\test\Output.csv" The script is not working. I don't know why.

    Read the article

  • Using Public/Private keys in reverse

    - by Wizzarding
    Hi, I have a situation where I need to make some data available for reading by anyone from a specific device, where the data is pre-loaded on the device, but I cannot allow anyone to create their own device and populate it with their own data in the same format. I know this sounds a little crazy, but there is a good reason! I was planning to use Public Key cryptography, encrypting the data with a public key, but then publishing the private key to anyone who wants to read the data. However, after looking at the RSACryptoServiceProvider and how it works it looks like I cannot just publish the private key as the private key can be used to create the public key. Could someone confirm that suspicion, or give me some hints on how I might be able to make this work! Many Thanks.

    Read the article

  • Stored Connection Strings per user

    - by pehaada
    In the past I've used a Singleton Pattern to load the connection string when the application starts via the global.asa file. I have a project now where each user has a unique connection string to the database. I would like to load this connection string once. The issue is that the singleton pattern will not work for me since each user has there own connection string. Basically the connection string is created dynamically. I do not want to store it is session. If anyway has a clever way of doing this in .NET let me know ?

    Read the article

  • Displaying cookies as key=value for all domains?

    - by OverTheRainbow
    Hello, This question pertains to the use of the cookie-capable WebClient derived class presented in the How can I get the WebClient to use Cookies? question. I'd like to use a ListBox to... 1) display each cookie individually as "key=value" (the For Each loop displays all of them as one string), and 2) be able to display all cookies, regardless of the domain from which they came ("www.google.com", here): Imports System.IO Imports System.Net Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim webClient As New CookieAwareWebClient Const URL = "http://www.google.com" Dim response As String response = webClient.DownloadString(URL) RichTextBox1.Text = response 'How to display cookies as key/value in ListBox? 'PREF=ID=5e770c1a9f279d5f:TM=1274032511:LM=1274032511:S=1RDPaKJKpoMT9T54 For Each mycc In webClient.cc.GetCookies(New Uri(URL)) ListBox1.Items.Add(mycc.ToString) Next End Sub End Class Public Class CookieAwareWebClient Inherits WebClient Public cc As New CookieContainer() Private lastPage As String Protected Overrides Function GetWebRequest(ByVal address As System.Uri) As System.Net.WebRequest Dim R = MyBase.GetWebRequest(address) If TypeOf R Is HttpWebRequest Then With DirectCast(R, HttpWebRequest) .CookieContainer = cc If Not lastPage Is Nothing Then .Referer = lastPage End If End With End If lastPage = address.ToString() Return R End Function End Class Thank you.

    Read the article

  • Compressing a database to a single file?

    - by Assimilater
    Hi all. In my contact manager program I have been storing information by reading and writing comma delimited files for each individual contact, and storing notes in a file for each note, and I'm wondering how I could go about shrinking them all into one file effectively. I have attempted using data entry tools in the visual studio toolbox and template class, though I have never quite figured out how to use them. What would be especially convenient is if I could store data as data type IOwner (a class I created) as opposed to strings. I'd also need to figure out how to tell the program what to do when a file is opened (I've noticed in the properties how to associate a file type with the program though am not sure how to tell it what to do when it's opened). Edit: How about rephrasing the question: I have a class IContact with various properties some of them being lists of other class objects. I have a public list of IContact. Can I write Contacts as List(Of IContact) to a file as opposed to a bunch of strings? Second part of the question: I have associated .cms files with my program. But if a user opens the file, what code should the program run through in an attempt to deal with the file? This file is going to contain data that the program needs to read, how do I tell it to read a file when the program is opened vicariously because the file was opened? Does this make the question clearer?

    Read the article

  • Can I change properties of inherited controls at design time?

    - by Jeff Stock
    I am using visual inheritance and was wondering if there is a way to change the properties of inherited controls at design time, preferably in the form designer. If not, then in the designer code. I have my control declared as Public in the base class. I can access it in the child form code, but not in the form designer. Is this just not possible?

    Read the article

  • How is this input tag linking to another page?

    - by Matt
    Response.Write("<div><input type='submit' name='submit' value='Update Cart' /></div>") Response.Write("<div><input type='submit' name='submit' value='Shop More' /></div>") Response.Write("<div><input type='submit' name='submit' value='Checkout' /></div>") that is some example code from my teacher, but he hasn't answered my email in a couple days so I need some help. When you click the Update Cart button it just updates the cart page it's on, but when you click the Shop More button it links to Shop.aspx a different page, and the Checkout links to another page as well. I can't figure out how it is linking just from that code, anybody have any insights?

    Read the article

  • MD5CryptoServiceProvider ComputeHash Issues between VS 2003 and VS 2008

    - by owensoroke
    I have a database application that generates a MD5 hash and compares the hash value to a value in our DB (SQL 2K). The original application was written in Visual Studio 2003 and a deployed version has been working for years. Recently, some new machines on the .NET framework 3.5 have been having unrelated issues with our runtime. This has forced us to port our code path from Visual Studio 2003 to Visual Studio 2008. Since that time the hash produced by the code is different than the values in the database. The original call to the function posted in code is: RemoveInvalidPasswordCharactersFromHashedPassword(Text_Scrub(GenerateMD5Hash(strPSW))) I am looking for expert guidance as to whether or not the MD5 methods have changed since VS 2K3 (causing this point of failure), or where other possible problems may be originating from. I realize this may not be the best method to hash, but utimately any changes to the MD5 code would force us to change some 300 values in our DB table and would cost us a lot of time. In addition, I am trying to avoid having to redeploy all of the functioning versions of this application. I am more than happy to post other code including the RemoveInvalidPasswordCharactersFromHashedPassword function, or our Text_Scrub if it is necessary to recieve appropriate feedback. Thank you in advance for your input. Public Function GenerateMD5Hash(ByVal strInput As String) As String Dim md5Provider As MD5 ' generate bytes for the input string Dim inputData() As Byte = ASCIIEncoding.ASCII.GetBytes(strInput) ' compute MD5 hash md5Provider = New MD5CryptoServiceProvider Dim hashResult() As Byte = md5Provider.ComputeHash(inputData) Return ASCIIEncoding.ASCII.GetString(hashResult) End Function

    Read the article

  • Copy text from website.

    - by VBeginner
    So, I've been saving a .txt file from a website and using... My.Computer.FileSystem.ReadAllText() To put it into a string. But I figured it'd be more efficient to just grab it directly. How do I go about this? Thank you.

    Read the article

  • Attempted to perform an unauthorized operation

    - by Lefteris Gkinis
    Now I use the following code: Public Function SetACL(ByVal filename As String, ByVal account As String, ByVal sender As Object, ByVal e As System.EventArgs) As Boolean Try Dim rule As FileSystemAccessRule = New FileSystemAccessRule(account, FileSystemRights.Write, AccessControlType.Allow) Dim fp As PermissionSet = New PermissionSet(Permissions.PermissionState.Unrestricted) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.Read, filename)) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.Write, filename)) fp.AddPermission(New FileIOPermission(FileIOPermissionAccess.PathDiscovery, filename)) fp.Assert() Dim di As DirectoryInfo = New DirectoryInfo(Path.GetDirectoryName(filename)) SetACL = False Dim security As DirectorySecurity = di.GetAccessControl(AccessControlSections.Access) security.ModifyAccessRule(AccessControlModification.Add, rule, SetACL) di.SetAccessControl(security) Return SetACL Catch ex As Exception MessageBox.Show(ex.Message, "Set Security Sub", MessageBoxButtons.OK, MessageBoxIcon.Stop) Finalize() End Try End Function The Error of 'Attempted to perform an unauthorized operation' comes when i'm trying to execute the instraction Dim security As DirectorySecurity = di.GetAccessControl(AccessControlSections.Access) Please if anybody knows why that error comes here to respond

    Read the article

  • Validate Div tag seperately...

    - by Joby Kurian
    i have 3 div tags.Each having no. of textboxs and button.Each textbox having validation.For all button causesvalidation property is true.If i click "button1" in "div1" tag will cause validation of other textbox in other div tags.I dont want to do this ? How to avoid this?

    Read the article

  • CKEdtior not displaying

    - by user1708468
    I am trying to integrate CKEditor into a MVC application. As far as I can tell all I should really have to do is. Add the following to my master page. <script type="text/javascript" src="../../ckeditor/ckeditor.js"></script> <script type="text/javascript" src="../../ckeditor/adapters/jquery.js"></script> <script type="text/jscript" src="../../Scripts/jquery-1.3.2.js"></script> Then on my view itself. I have the following code: <script type="text/javascript"> $(document).ready(function() { $('#news').ckeditor(); }); </script> <fieldset> <legend>Fields</legend> <p> <label for="title">Title:</label> <%=Html.TextBox("title")%> <%= Html.ValidationMessage("title", "*") %> </p> <p> <label for="news">News:</label> <%=Html.TextArea("news")%> <%= Html.ValidationMessage("news", "*") %> </p> <p> <label for="publishedDate">Publication Date:</label> <%= Html.TextBox("publishedDate") %> <%= Html.ValidationMessage("publishedDate", "*") %> </p> <p> <input type="submit" value="Create" /> </p> </fieldset> Please bear in mind I am not trying to get this to actually DO anything postback wise. Just to actually render in the first place. Can someone point out exactly what it is I am doing wrong? Oh and if it helps any VS is also giving me the following warning: Warning 1 Error updating JScript IntelliSense: ..Cut to Protect the innocent..\ckeditor\ckeditor.js: 'getFirst()' is null or not an object @ 15:180 ..Cut to Protect the innocent..\Views\Shared\Admin.Master 1 1 ilaTraining

    Read the article

  • how to update database using datagridview?

    - by Sikret Miseon
    how do we update tables using datagridview? assuming the datagridview is editable at runtime? any kind of help is appreciated. Dim con As New OleDb.OleDbConnection Dim dbProvider As String Dim dbSource As String Dim ds As New DataSet Dim da As OleDb.OleDbDataAdapter Dim sql As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dbProvider = "PROVIDER=Microsoft.ACE.OLEDB.12.0;" dbSource = "Data Source = C:\record.accdb" con.ConnectionString = dbProvider & dbSource con.Open() sql = "SELECT * FROM StudentRecords" da = New OleDb.OleDbDataAdapter(sql, con) da.Fill(ds, "AddressBook") MsgBox("Database is now open") con.Close() MsgBox("Database is now Closed") DataGridView1.DataSource = ds DataGridView1.DataMember = "AddressBook" End Sub

    Read the article

  • escape double quote in vb string

    - by JKS
    i have used following piece of code to execute schtasks command from vb6 while executing it ignores folder if it contains space For example "C:\program files\test\test.exe" will be converted to "c:\program " how do i solve this issue? MyAppname = Chr(34) & App.Path & "\" & App.EXEName & ".exe" & Chr(34) StrCommand = "schtasks /create /sc ONLOGON /RL HIGHEST /tn myapp /tr " & MyAppname Shell StrCommand, vbHide thanks in advance

    Read the article

  • ASP.NET Custom Control - Default Template?

    - by Bob Fincheimer
    I know this is really picky, but can I have one template inside a user control: <uc:MyUserControl runat="server" ID="test"> <div><b>Test</b></div> <asp:PlaceHolder runat="server" id="pH" /> </uc:MyUserControl> Instead of what I have now which requires me to: <uc:MyUserControl runat="server" ID="test"> <Content> <div><b>Test</b></div> <asp:PlaceHolder runat="server" id="pH" /> </Content> </uc:MyUserControl> Basically I want my control to have only one ITemplate inside of it.

    Read the article

  • custom membership for dot net nuke

    - by Pius
    Hi!! i am new in dot net nuke.i just found that there is open id logging option in dot net nuke.And so i did need user to register afresh in my dnn application.This is because i have another mvc application which i would like to be the openid provider for my dnn application.and am totally confused on how to go about that? Again,is it possible to tamper with dnn membership such that i use aspnetsqlmembership? Your contributions will be highly appreciated. Thanks in advance..

    Read the article

  • Get a list of the last 10 Mondays

    - by Jonesy
    Hi folks, I wanna have a drop down that lets me select "Week Commencing Monday the 20th" going back 10 Mondays but I'm not sure how to go about doing this. I've used date.now(), etc. before but not sure how to do this one. Thanks, Billy

    Read the article

  • using threads in menu options

    - by vbNewbie
    I have an app that has a console menu with 2/3 selections. One process involves uploading a file and performing a lengthy search process on its contents, whilst another process involves SQL queries and is an interactive process with the user. I wish to use threads to allow one process to run and the menu to offer the option for the second process to run. However you cannot run the first process twice. I have created threads and corrected some compilation errors but the threading options are not working correctly. Any help appreciated. main... Dim tm As Thread = New Thread(AddressOf loadFile) Dim ts As Thread = New Thread(AddressOf reports) .... While Not response.Equals("3") Try Console.Write("Enter choice: ") response = Console.ReadLine() Console.WriteLine() If response.Equals("1") Then Console.WriteLine("Thread 1 doing work") tm.SetApartmentState(ApartmentState.STA) tm.IsBackground = True tm.Start() response = String.Empty ElseIf response.Equals("2") Then Console.WriteLine("Starting a second Thread") ts.Start() response = String.Empty End If ts.Join() tm.Join() Catch ex As Exception errormessage = ex.Message End Try End While I realize that a form based will be easier to implement with perhaps just calling different forms to handle the processes.But I really dont have that option now since the console app will be added to api later. But here are my two processes from the menu functions. Also not sure what to do with the boolean variabel again as suggested below. Private Sub LoadFile() Dim dialog As New OpenFileDialog Dim response1 As String = Nothing Dim filepath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) dialog.InitialDirectory = filepath If dialog.ShowDialog() = DialogResult.OK Then fileName = dialog.FileName ElseIf DialogResult.Cancel Then Exit Sub End If Console.ResetColor() Console.Write("Begin Search -- Discovery Search, y or n? ") response1 = Console.ReadLine() If response1 = "y" Then Search() ElseIf response1 = "n" Then Console.Clear() main() End If isRunning = False End Sub and the second one Private Shared Sub report() Dim rptGen As New SearchBlogDiscovery.rptGeneration Console.WriteLine("Tread Process started") rptGen.main() Console.WriteLine("Thread Process ended") isRunning = False End Sub

    Read the article

  • Format of DataGridView value

    - by Vadim
    I have a DataGridView which is filling from Table in SQL Server Database. One of it's columns is "price". Type of column in DGV is automatically sets as Decimal. In some cases I need to write in cells of this column text like "none", instead of price. How can I do it? DGV.Item("price", 0).Value = "none" doesn't work, because of decimal type of a cell.

    Read the article

  • VB.NET FileSystemWatcher Multiple Change Events

    - by John
    Hi. I have the following code: Imports System.IO Public Class Blah Public Sub New() InitializeComponent() Dim watcher As New FileSystemWatcher("C:\") watcher.EnableRaisingEvents = True AddHandler watcher.Changed, AddressOf watcher_Changed End Sub Private Sub watcher_Changed(ByVal sender As Object, ByVal e As FileSystemEventArgs) MsgBox(e.FullPath) End Sub End Class When I run it and save changes to a file on my C drive, the code works great, except it executes the watcher_Changed() method four times. Any idea why? The changeType is "4" every time. Thanks.

    Read the article

< Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >