Apr 16 2012

Slow Opening of Office Files through a Network

Published by under Windows

Your Excel files on remote networks take up to 2 minutes to load? You think there’s something wrong with your VPN or you need to tune Office? Not at all, here’s how to load your files in just a few seconds!
 
I couldn’t understand why my remote files were so slow to open from a Windows shared folder, Excel in particular but many others as well like Word or PDF files.
Till I opened files hosted on a Windows 2008 Server from a Windows 7 machine.
 
Here’s the trick:
Performance issues, in particular latency on WAN networks arise mostly with the SMB 1.0 protocol. SMB2 was introduced by Microsoft in Windows Vista and enhanced in Windows 7 and 2008 Server later on.
SMB2 is less “chatty”, sends requests before the previous response is received, and allows larger block sizes, among other improvements.
 
At the end of the day, the most important is the gain while opening remote files: it is SO much faster!
Only constraint, both client and server must support SMB2. In other cases, SMB1 will be used. You now know what you’re gonna have to do: upgrade to Windows 7 and 2008 Server.

 

No responses yet

Apr 05 2012

Autodesk Inventor Network License not Available

Published by under Misc

Autodesk Inventor logs in LMToolsInventor Network Licenses not Available>
There seems to be no tool to check which users have taken an
Autodesk Inventor network license. End users get a “network
license not available” message and keep asking the IT
department why they get no license to run the software or who
they were given to. I wrote this tool to avoid useless calls and give anybody the ability to check who’s connected at this very moment, so they can deal with each other to release a license.


Inventor generates a log file in which each (dis)connection is recorded among other information. The script parses the file and displays online users.
 
Only 2 steps are needed to set this up:
– Set the path to the log file flex.log to a read only shared folder and give access to the end users.
– Create the following inventor.vbs script in the same folder.
 
The script was written in VB so it can be run from any Windows computer. I made it available to users on a Windows share.
Set the “Users” variable to your own number of licenses. We have 4 concurrent Inventor licenses in our case.

Now users know where they should be looking when they get a Inventor “network license not available” message.

Option Explicit

Dim objFSO, objFile, strTextFile
Dim line, allSessions(), offline, currentSessions, firstIndex
Dim i, l
CONST ForReading = 1
CONST Users = 4

'Log filename
strTextFile = "flex.log"

'Create a File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
if not (objFSO.FileExists(strTextFile)) then
   MsgBox strTextFile&" does not exist!", vbExclamation, "Error"
   wscript.quit
end if
Set objFile = objFSO.OpenTextFile(strTextFile, ForReading)

i = 0

' Search for connections in reverse order
Do Until objFile.AtEndOfStream
    Line = objFile.ReadLine
    If (not InStr(line, "(adskflex) OUT:") = 0) or (not InStr(line, "(adskflex) IN:") = 0) Then
        Redim Preserve allSessions(i)
        allSessions(i) = line
        i = i + 1
    End If
Loop

' Index in allSessions
On Error Resume Next
l = UBound(allSessions)
' Count licenses
i = 0

if (l = "") then
   currentSessions = "Nobody connected"
end if

' Returns x last connections
' without duplicates
Do While (i < Users) and (l >= 0)
   line = split(allSessions(l))
   if line(0) = "" then
      ' Check if user has not disconnected
      if StrComp(line(3), "In:", vbTextCompare) = 0 and InStr(currentSessions, line(5)) = 0 then
         offline = offline & line(5) & " "
      end if
      if InStr(currentSessions, line(5)) = 0 and InStr(offline, line(5)) = 0 then
         currentSessions = currentSessions & line(1) & " " & line(5) & VbCrLf
         i = i + 1
      end if
   else
      if StrComp(line(2), "In:", vbTextCompare) = 0 and InStr(currentSessions, line(4)) = 0 then
         offline = offline & line(4) & " "
      end if
      if InStr(currentSessions, line(4)) = 0 and InStr(offline, line(4)) = 0 then
         currentSessions = currentSessions & line(0) & " " & line(4) & VbCrLf
         i = i + 1
      end if
   end if
   l = l - 1
Loop

MsgBox currentSessions, vbInformation, "Inventor licenses"
'wscript.echo currentSessions

objFile.Close

'Cleanup
Set objFSO = Nothing
 

3 responses so far

Dec 07 2011

Merge Files in DOS

Published by under Windows

You can easily concatenate ascii or binary files with the Windows command prompt using COPY:
 

COPY /A file1.txt+file2.txt dest.txt
COPY /B file1.bin+file2.bin dest.bin

 
Where dest is the destination filename

 

No responses yet

Nov 10 2011

Delete Backup Exec B2D Files

Published by under Backup

Here’s a script that deletes all the Backup Exec B2D files part of a media set. Stick the following script into a .bat file and edit the first 3 settings Mediaset, B2Dfolder and BEPath.
You can run it straight.
 
I consider it is good practice to do for the following reasons:
– You can of course set the overwrite protection and Backup Exec reuses the BKF files when they’re no longer needed. This system works pretty well in most cases especially if there’s plenty of space on the disk. If a backup is delayed and you run out of space, the next backup will be delayed until the first times out.
– I’ve seen enough people on forums getting bad restore or duplication speed due to a high disk fragmentation. This is no more an issue when files get deleted.
 

@Echo Off
::
:: Deletes Backup Exec BKF files.
::

:CONFIGURE
 SETLOCAL
::
:: Edit the following 3 items below to match your installation.
::
:: * MediaSet - the Backup Exec Media Set Name you are using for backup-to-disk jobs 
::   Works with spaces
:: * B2Dfolder - the full path to the backup-to-disk folder you are using for the job
:: * BEPath - the full path to the Backup Exec executables (specifically, bemcmd.exe).
::   (If you did not change it, this is C:\Program Files\Symantec\Backup Exec\bemcmd.exe, 
::   on US English systems)

 SET MediaSet="Disk Media"
 SET B2Dfolder=S:\Backup\
 SET BEPath="C:\Program Files\Symantec\Backup Exec\bemcmd.exe"

 IF NOT EXIST %BEPath% ECHO Cannot find the path to Backup Exec!^
 Please edit the command script. ^
 && goto End

:: Get Media Set Id from Media Set Name
:: Works with white spaces

 FOR /F "tokens=3" %%m IN ('"%BEPath% -o70 -j%MediaSet%" ^| FINDSTR ^{[-0-9A-F]*}
) do (
   SET MediaSetId=%%m
 )

:: Retired Media Set Id: identical on all systems
 SET RetiredMediaSetId={00000009-0002-0000-0000-000000000000}

:MAIN
::
:: First, dump a list of all the media labels Backup Exec is currently using.
:: Move them to the retired media set
:: and deletes them in Backup Exec and physically on the disk
::

 FOR /F "tokens=3" %%m IN ('"%BEPath%" -o132 -i%MediaSetId% ^| FINDSTR ^B2D[0-9]*
) do (
  ECHO Processing %%m...
  :: Move media to Retired Medias
  %BEPath% -o130 -j%%m -ms:%RetiredMediaSetId% > NUL
  :: Delete media from Backup Exec
  %BEPath% -o129 -m%%m > NUL
  :: Delete media from filesystem
  IF EXIST %B2Dfolder%%%m.bkf DEL %B2Dfolder%%%m.bkf
 )

:END
ENDLOCAL

 
Note: The script should be scheduled in the Windows Scheduled Tasks. Don’t launch it from a Backup Exec pre-job script, it will not run. Only a limited number of bemcmd operations can be performed in a pre-job script

 

5 responses so far

Mar 11 2011

MRemote multi-tab remote connection manager

Published by under Misc

Not a technical post but a useful piece of software…

I was pissed off having so many windows on my desktop while connecting to different remote services. Till I found MRemote that lets you manage all your network connections in a single multi tab window.

You can create Remote desktop, SSH, telnet, VNC and many more connections within the same Window

 

No responses yet

« Prev - Next »