Welcome to the IDM Forum. This forum is meant as a user-to-user support mechanism where users can share knowledge and tips for all IDM software.
Since these forums are user-to-user based, IDM does not regularly read or reply to the posts in this forum. For problem reports, suggestions, or feature requests, you must email us directly. Our trained technical support staff answers most inquiries within 30 minutes.


'switchUE.vbs
'Switch between 2 (TWO!!!) UltraEdit installations
'PREREQUISITES:
'- Active folder is called like ...\UltraEdit
'- A second folders has to be named like ...\UltraEdit11 (with a SUFFIX as difference)
'- Make sure there are no UEdit* files in your Windows directory !
'
'Use the star (*) to look for configs YOU have to do :-)
'
Option Explicit
Dim shl
Dim exename
Dim folderNewVersion 'check what is currently active + Plausicheck
DIM folderOldVersion 'check what is currently active + Plausicheck
Dim folderRunVersion
Dim folderAktVersion
Dim folderPasVersion
Dim args
Dim fso
DIM AKTVERSION 'aktive Version
DIM PASVERSION 'passive Version
DIM OLDVERSION
DIM NEWVERSION
DIM SLASH
DIM cntFolders
dim answer
OLDVERSION = "11" '*
NEWVERSION = "12" '*
folderRunVersion = "C:\Progra~1\Ultraedit" '*
folderNewVersion = folderRunVersion & NEWVERSION
folderOldVersion = folderRunVersion & OLDVERSION
exename = "uedit32.exe"
SLASH = "\"
cntFolders = 0
'*** No more modification needed from here on ... ***
Set fso = CreateObject("Scripting.FileSystemObject")
cntFolders = abs(fso.FolderExists(folderRunVersion)) + _
abs(fso.FolderExists(folderNewVersion)) + _
abs(fso.FolderExists(folderOldVersion))
'first, test the installation with its current configuration
if cntFolders <> 2 then
MeldungRaus ("Error. There are no 2 Ultraedit-Installations found. Found " & cntFolders)
'else
' MeldungRaus ("Looks good. Found " & cntFolders)
end if
if fso.FolderExists(folderNewVersion) then
AKTVERSION = OLDVERSION
PASVERSION = NEWVERSION
else
AKTVERSION = NEWVERSION
PASVERSION = OLDVERSION
end if
folderAktVersion = folderRunVersion & AKTVERSION
folderPasVersion = folderRunVersion & PASVERSION
answer = MsgBox("Active UE is version " & AKTVERSION & "." & vbcrlf & _
"Should version " & PASVERSION & " be activated ?" & vbcrlf & vbcrlf & _
"YES=activate and start" & vbcrlf & _
"NO =just activate, no UE start" & vbcrlf & _
"Cancel = do nothing" & vbcrlf _
, vbQuestion+vbYesNoCancel, "Switch active UE-Version. CLOSE RUNNING UE's NOW !!!")
if answer = vbcancel then
wscript.quit
end if
'activate
'msgbox folderRunVersion & "-->" & folderAktVersion & vbcrlf & _
' folderPasVersion & "-->" & folderRunVersion
fso.MoveFolder folderRunVersion, folderAktVersion
fso.MoveFolder folderPasVersion, folderRunVersion
if answer = vbyes then
'Start UE
Set shl = WScript.CreateObject("WScript.Shell")
shl.Run folderRunVersion & SLASH & exename,1 ,FALSE
end if
wscript.quit
'----------------------------------------------------------------------------------
Sub MeldungRaus (strMeld)
wscript.echo strMeld
wscript.quit 1
End Sub