+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Double check this script please in Coding and Web Development; Hi guys, just creating a WIKI article, please can someone check the variables on this please: Display a message using ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,821
    Thank Post
    873
    Thanked 1,675 Times in 1,458 Posts
    Blog Entries
    12
    Rep Power
    444

    Double check this script please

    Hi guys, just creating a WIKI article, please can someone check the variables on this please:

    Display a message using a balloon in the system tray / notification area - EduGeek.net Wiki

    I want it to copy a file and register a .dll, if there is any unnecessary variables there please let me know.

    Thanks

    Z

  2. #2
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34
    3 obvious errors;

    1 - The 7th line of code should read;
    If Not objFSO.FileExists("C:\windows\System32\SystemTray.dll") Then
    2 - The first line of code in the 'copysystemtrayfile' sub should read;
    objFSO.CopyFile "\\fn.local\NETLOGON\bin\SystemTray.dll", "C:\windows\System32\"
    3 - The 'Dim filesys' is not required
    You might also want to use a system variable to determine the location of the System32 folder rather than hard coding it as 'C:\Windows\System32'.

    This whole script would be easier to write in AutoIt;

    const $SysTrayDllSource = "\\fn.local\netlogon\bin\systemtray.dll"

    if not FileExists(@SystemDir & "\SystemTray.dll) then
    FileCopy($SysTraySource, @SystemDir, True)
    RunWait("regsvr32.exe " & @SystemDir & "\systemtray.dll /s", @SystemDir)
    EndIf
    Of course if you were to use AutoIt scripts, you would not need the SystemTray dll in the first place as AutoIt can already do that!!

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 17
    Last Post: 19th March 2010, 11:51 PM
  2. Script Need to check disk space on remote servers
    By screwuphead in forum Scripts
    Replies: 8
    Last Post: 26th November 2007, 05:28 PM
  3. PHP IMAP check mail script
    By netadmin in forum Web Development
    Replies: 2
    Last Post: 22nd April 2007, 03:47 AM
  4. Replies: 4
    Last Post: 25th December 2006, 09:15 PM
  5. VB Script ti check for folder and then copy contents to PC
    By tosca925 in forum How do you do....it?
    Replies: 4
    Last Post: 2nd October 2006, 08:15 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •