FN-GM Posted May 16, 2008 Posted May 16, 2008 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
ajbritton Posted May 28, 2008 Posted May 28, 2008 3 obvious errors; 1 - The 7th line of code should read;If Not objFSO.FileExists("C:\windows\System32\SystemTray.dll") Then2 - 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!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now