X-Setup Pro

Select your language: 

Windmeier Internet Services UG

X-Setup Pro | Free Vista Files Certify

X-Setup Pro Plugins

Note for everybody who is visiting this page via a search engine like Google:
This page shows the HTML version (with full source code) of one of our many plugins included with our tweaker utility X-Setup Pro. With this tool you can change over 1,700 settings for Windows and other applications - settings that are normally hidden deep inside the registry. Read more about X-Setup Pro on our Product info about X-Setup ProProduct page.

If you are interested in using this plugin, because it contains a tweak you would like to have, it's easy as 1-2-3-4:

  • Download X-Setup Pro from our Download X-Setup ProDownload page.
  • Install it on your computer and execute it.
  • On the welcome screen, select "Classic mode".
  • Simply use the information about the path and the name of the plugin shown below to easily locate it.

Plugin details

This is the HTML representation of the plugin Autoplay Data CDs (Version 2.09) which can be found in the following path(s) in X-Setup Pro classic:
System\AutoPlay\Data CDs Options

The plugin can be executed on the following Windows versions (Operation Systems):
Windows 95 Windows NT 4.0 Windows 98 Windows 2000 Windows ME

Description :
If you normally insert a CD in your CD-ROM-drive, Windows starts a program using the file AUTORUN.INF (AutoPlay). If you do not like this behavior, or want to enable this behavior for other drives also, you can do it here. IMPORTANT: If you activate AutoRun for removable devices or network drives, Windows will check these drives every time you open the Explorer or a file requester in an application. Because this check takes some time, this behavior can be really annoying. Please keep this in mind.

The plugin was created by Xteq Systems
Copyright © Xteq Systems - All Rights Reserved

The plugin offers the following user-interface controls:
Allow autostart for CD-ROMs (normal)
Allow autostart for removable drives (diskettes, ZIP)
Allow autostart for fixed drives (HD)
Allow autostart for network drives

Below is the code of this plugin written in "VBScript". Please note that this code can only be executed inside X-Setup Pro.

'What about this key?
'HKLM\System\CurrentControlSet\Services\Cdrom\Autorun

'Declaration of some constants
DRIVE_UNKNOWN=1   'Bit 0
DRIVE_NO_ROOT=2   'Bit 1
DRIVE_REMOVABLE=4 'Bit 2 
DRIVE_FIXED=8     'Bit 3 
DRIVE_REMOTE=16   'Bit 4 
DRIVE_CDROM=32    'Bit 5 
DRIVE_RAMDISK=64  'Bit 6 
DRIVE_FUTURE=128  'Bit 7 

sPathValue="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun"

'Called when the Plugin is started
SUB Plugin_Initialize
 s=RegReadValue(sPathValue)

 dim i
 if len(s)>1 then
    s=left(s,2)
    i=s
 else
    i=CInt(0)
 end if
 
 '//Convert the value to INT
 s="&H" & i
 i=CInt(s)


 'TH: Looks stupid, I know! but there is no way to get OR working with variants!
 'AK: JScript ||. Should work

 dim b1,b2,b3,b4,b5,b6,b7
 i=OrHelper(i,DRIVE_FUTURE,b1)
 i=OrHelper(i,DRIVE_RAMDISK,b2) 
 i=OrHelper(i,DRIVE_CDROM,b3)
 i=OrHelper(i,DRIVE_REMOTE,b4)
 i=OrHelper(i,DRIVE_FIXED,b5)
 i=OrHelper(i,DRIVE_REMOVABLE,b6)
 i=OrHelper(i,DRIVE_NO_ROOT,b7)


 '//If the bit is set, AutoRun is DISABLED
 Call SetBox(b3,1)
 Call SetBox(b6,2)
 Call SetBox(b5,3)
 Call SetBox(b4,4)
END SUB

Function OrHelper(CurValue,CheckVal,CheckValSet)
 i=CurValue

 if i>=CheckVal then
    CheckValSet=true
    i=i-CheckVal
 else
    CheckValSet=false
 end if

 OrHelper=i
End Function

Sub SetBox(CurVal,Elm)
    if CurVal=true then
       SetUIElement elm,false
    else
       SetUIElement elm,true
    end if
End Sub


'Called when the Plugin should validate the Data the user has entered
SUB Plugin_CheckData(ElementIndex)
END SUB

'Called when the Plugin should apply the changes
SUB Plugin_Apply(ElementIndex,ElementSubIndex)
 i=0

 'Always disable autorun for the following drives 
 'according to Q136214 from MS KB
 i=i+DRIVE_UNKNOWN
 i=i+DRIVE_FUTURE
 '//Needed??? i=i+DRIVE_NO_ROOT


 'No let's see what the user wants
 if GetUIElement(1)=false then i=i+DRIVE_CDROM
 if GetUIElement(2)=false then i=i+DRIVE_REMOVABLE
 if GetUIElement(3)=false then i=i+DRIVE_FIXED
 if GetUIElement(4)=false then i=i+DRIVE_REMOTE

 'Convert to HEX so XSET can write the value
 Dim v
 v=Hex(i) 
 v=v & "000000"

 Call RegWriteValue(sPathValue,v,3)
 Call Restart
END SUB

'Called when the Plugin is about to be removed from memory
SUB Plugin_Terminate
END SUB

Comment by the author: This was a hell lot of work! Special thanks to Tony Caine (72614.1451@compuserve.com) who has helped us a lot with this plug-in. Also thanks to Guy (dr_teeth@bigfoot.com). Thanks to Sander Goudswaard for the "...START vs ...RUN" notice! Thanks to totalXS for his help! Thanks to Matthias Meißer for pointing us to the Windows XP = REG_DWORD bug!


You can get more detailed information about this plugin inside the application X-Setup Pro. Get the most popular tweaker software for free: Download X-Setup ProDownload X-Setup Pro