IPB

Welcome Guest ( Log In | Register )

9 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> ServicesPE, edit remote/local sevices and devices
korale
post Aug 3 2005, 01:15 PM
Post #1


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



new Update: ServicesPE 1.4korale

ServicesPE.zip downloads:
rapidshare.com
CrazySharing.com
uploadstar.net

here is a list of changes - it's not detailed and completive. (ServicesPE 1.3korale)
- no language support
- no command line arguement support
- no visual goodies
- changed status bar (now shows only a short info where the hive is loaded from)
+ changed some terms because i finally was confused by local and remote (just have a look at the app to get a clue)
+ improved/reengineered routine for getting services and devices from registry
+ improved error handling while loading services/devices
+ compatibility with newest autoit v3.2.8.1
+ as far as i know (i'm the only tester) STABLE ;D
+ menu "?" - "911 CD forum" loads in your default browser not just in IE
+ includes ewieldra's _ReduceMemory - function

impact on servicespe:
- less improvements relating GUI and appliance
+ some improvements relating stability and performance
+ many improvements relating code

dll-files used to get icons for servicespe.exe: (FeReNGi's release does have its own icons)
shell32.dll
setupapi.dll
newdev.dll

plus latest changes: (ServicesPE 1.4korale)
* unified functions to access hives (now it's easier to use the functions in further/new programs)
- including outsourcing of the whole hive-loading-stuff to the HiveMgmt.ac3 "libary"
- changed error handling in above mentioned functions
* bugfix: in the "View"-menu the check mark did not switch between Services and Devices
* switched "local" and "running" icon
* still compiled and compatible with autoit v3.2.8.1 - not with latest release v3.2.10

FYI:
* i did not change any "core" functionality (ediing of services)
* most changes are relate to code reengineering (improving and cleaning code)


FeReNGi's release: ServicesPE 1.0a
paraglidernc.com


See also at Paraglider's homepage.
@Paraglider thnx for hosting the file



v0.5a (25.11.2005)
* removed the extra dialog to select the SYSTEM hive file

v0.5 (25.11.2005)
* multilingual version (use language files), default language is english, if no language file is used
* no other except some minor code layout changes

v0.4 (25.08.2005)
* included groups (actualy wanted to define an icon for each device depending on group, but Autoit sort function does support different icons in listview)
* unified the two dialogs edit and new
* changed icons in button menu - may be more compatible if you don't use an explorer shell
* fixed a bug - so first item of services/devices will not display random characters in DisplayName if it's actually empty
* if service edited (changed) to device or vice versa the listviews will be updated corectly

Version v0.3
* fixed some bugs (update and other small probs that came up with the new gui)
* added "install new service/device" (not tested yet, should work with simple services/devices like FILEDISK)

hope everything works now blink.gif

by the way:
as you can see the Displayname of first Service/Device shows up with some strange characters in the gui if it's actually blank
same similar effect with the "new" feature - this second effect disappears, if you restart the program
and there are also some strange characters in the log file
don't know why. maybe someone can help me to fix it. unsure.gif

New Version... v0.2

* updated the GUI (now it's easier to add functinality)
* added a log function (now you can track all changes, so it's easy to roll back)
* cleaned the code
* Update and Delete are accessible by right mouse click

* removed dll-registration from script:
regsvr32.exe /s /i shell32.dll
regsvr32.exe /s mlang.dll
regsvr32.exe /s /i browseui.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s /i mshtml.dll
regsvr32.exe /s /i shdocvw.dll

if you use an explorer shell like XPE you might not need it. try out.

*******************************************
25.11.2005
removed code from post, it's to long
it's included in the cab-file on Paraglider's homepage
*******************************************

This post has been edited by korale: Mar 5 2008, 03:19 AM
Go to the top of the page
 
+Quote Post
korale
post Aug 3 2005, 01:16 PM
Post #2


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



************
*ServicesPE*
************

load local SYSTEM hive and edit selected options of SERVICES and DEVICES
written in AutoIt Script

options to edit:
----------------
* update:
START (Boot, System, Automatic, Manual, Disabled)
TYPE (Driver, FileSystem, AdapterArguments, FileSystemInterpreter,
Process, Shared, Process (Interactive), Shared (Interactive))
ERRORCONTROL (Ignore, Normal, Severe, Critical)
DEPENDONSERVICE (comma separated values)
PATH (of service/device)

- for updating values select a service/device from the list by left mouse click
- check the CheckBox of the option(s) you want to change
- change the values
- press the Update button
(a dialog pops up and asks, if you're shure)

* delete service (not yet tested but should work)
- for deleting service/device select one from the list by left mouse click
- push the Delete button
(a dialog pops up and asks, if you're shure)

This software is in beta phase, use on your own risk and don't use if you don't
understand what this software is for.

There is also a little bugs (e.g. one of the diplay names of the first service/device is wrong, don't know why).
The routines for hive loading are from RegEditPE (thanx).
Go to the top of the page
 
+Quote Post
nyphis
post Aug 3 2005, 07:27 PM
Post #3


Member
**

Group: Members
Posts: 64
Joined: 25-October 03
From: Germany
Member No.: 2,195



could you please post the compiled exe?

or may you post GuiListView.au3 and GuiCombo.au3 - they're not included in the normal AutoIT installation?

i can't find any information about GuiCombo.au3 on the web - so it's a little bit difficult to text or compile ...

thanks in advance

regards,
nyphis


--------------------
www.pebuilder.de - German PEBuilder Forum
Go to the top of the page
 
+Quote Post
hilander999
post Aug 3 2005, 08:51 PM
Post #4


Platinum Member
*****

Group: Members
Posts: 2,277
Joined: 20-September 03
From: Earth: It's the little blue planet circling the Sun in the Milky Way Galaxy.
Member No.: 1,729



QUOTE (nyphis @ Aug 3 2005, 07:27 PM)
could you please post the compiled exe?

or may you post GuiListView.au3 and GuiCombo.au3 - they're not included in the normal AutoIT installation?

i can't find any information about GuiCombo.au3 on the web - so it's a little bit difficult to text or compile ...

thanks in advance

regards,
nyphis
*
You must install the beta version
QUOTE
this prog is written in AutoIt Script 3.1.1.65 beta


--------------------
Free stuff:

Official BTS Driverpack Support for bartpe

The Ultimate Boot CD for Windows: Forum

--------------------------------------------------------------------------------------------------------------
Please remember to use the SEARCH engine before posting new topics.
Also remember to select "All Forums" & "Show results as posts" in the options.

--------------------------------------------------------------------------------------------------------------
"When one's words are not better than silence, One should remain silent." ~ Kwai Chang Caine
Go to the top of the page
 
+Quote Post
nyphis
post Aug 4 2005, 08:05 AM
Post #5


Member
**

Group: Members
Posts: 64
Joined: 25-October 03
From: Germany
Member No.: 2,195



got the Beta ... thanks ...

it seems to work pretty good ... I was able to change the services on the remote system without problems ...
  1. is it possible to create a list of variables on the beginning of the script or in a seperate file so that the program can be easily translated?

  2. in line 384...
    CODE
    Func loadDLLs ( )
    If Not FileExists ( EnvGet('AllUsersProfile') & '\Anwendungsdaten\Services' ) Then
    [...]
    DirCreate ( EnvGet('AllUsersProfile') & '\Anwendungsdaten\Services' )
    [...]
    ... may be with an English Windows-source this won't work!

    Anwendungsdaten is Application Data in English ... try @AppDataCommonDir:
    CODE
    Func loadDLLs ( )
    If Not FileExists ( @AppDataCommonDir & '\Services' ) Then
    [...]
    DirCreate ( @AppDataCommonDir & '\Services' )
    [...]

  3. I added an Icon to the Gui ... line 52 ...
    CODE
    ; ***********************
    ; GUI - Formatting
    ; ***********************
    GuiCreate('ServicesPE v0.1', 640, 495, (@DesktopWidth-640)/2, (@DesktopHeight-495)/2)
    GuiSetIcon("filemgmt.dll", 0)

  4. the German translation with small improvements in Design of the GUI ...
    CODE
    ; ======================
    ; VARIABLES
    ; ======================
    #include <Array.au3>
    #include <GUIConstants.au3>
    #include <GuiListView.au3>
    #include <GuiCombo.au3>

    Opt('MustDeclareVars', 1)
    Opt('GUICloseOnESC', 0)
    Opt('TrayIconHide', 1); Hide the AutoIt tray icon
    If WinExists('%_ServicesPE_GUI') Then Exit

    AutoItWinSetTitle('%_ServicesPE_GUI_%')

    ; ==========================
    ; Registry: Service Values
    ; ==========================
    DIM $type[3][9] = [[1,1,2,4,8,16,32,272,288], ['Driver', 'Driver', 'FileSystem', 'AdapterArguments', 'FileSystemInterpreter', 'Process', 'Shared', 'Process (Interactive)', 'Shared (Interactive)'], ['Device', 'Device', 'Device', 'Device', 'Device', 'Service', 'Service', 'Service', 'Service']]
    DIM $arrType[9] = [1,1,2,4,8,16,32,272,288]

    DIM $start[5] = ['Boot', 'System', 'Automatisch', 'Manuell', 'Deaktiviert']
    DIM $errorCtrl[4] = ['Ignorieren', 'Normal', 'Streng', 'Kritisch']
    DIM $hiveLoaded = 0

    DIM $baseKey = 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\'
    DIM $baseDir = EnvGet('WinDir') & '\System32'

    DIM $lvServiceList, $lvDeviceList
    DIM $group1, $group2, $guiStart, $guiType, $guiErrorCtrl, $guiPathBtn, $guiPath, $guiUpdateBtn, $radioServices, $radioDevices
    DIM $guiPathCB, $guiErrorCtrlCB, $guiTypeCB, $guiStartCB, $guiDependOnCB, $guiDependOn, $guiStatus, $guiDelBtn
    DIM $i, $j, $pos, $msg

    DIM $FixedDrives[24]
    DIM $WinDir
    DIM $System

    ; ***********************
    ; Load Dll's + Hive
    ; ***********************
    loadDLLs()

    If MsgBox(36, 'Registry-Hive laden', 'Registry von lokalem System laden?') == 6 Then
    Load()
    $hiveLoaded = 1
    EndIf

    ; ***********************
    ; GUI - Formatting
    ; ***********************
    GuiCreate('ServicesPE v0.1', 640, 495, (@DesktopWidth-640)/2, (@DesktopHeight-495)/2)
    GuiSetIcon("filemgmt.dll", 0)

    ; =====================
    ; ListView Services
    ; =====================
    GUICtrlDelete($lvServiceList)
    $lvServiceList = GUICtrlCreateListView('Anzeigename|Dienstname|Start|Typ|Beschreibung|Pfad|Benutzer|Fehlerkontrolle|
    Abhängigkeiten', 0, 0, 640, 297)

    ; ====================
    ; ListView Devices
    ; ====================
    $lvDeviceList = GUICtrlCreateListView('Anzeigename|Dienstname|Start|Typ|Beschreibung|Pfad|Benutzer|Fehlerkontrolle|
    Abhängigkeiten', 0, 0, 640, 297)
    GUICtrlSetState ($lvDeviceList, $GUI_HIDE + $GUI_DISABLE)

    ; ============
    ; Options
    ; ============
    $group1 = GuiCtrlCreateGroup('Optionen:', 5, 300, 400, 175)

    $guiStartCB = GUICtrlCreateCheckbox ('Start: ', 20, 322)
    $guiStart = GUICtrlCreateCombo ('Boot', 120,320,120,20)
    GUICtrlSetData($guiStart,'System|Automatisch|Manuell|Deaktiviert')

    $guiTypeCB = GUICtrlCreateCheckbox ('Typ: ', 20, 352)
    $guiType = GUICtrlCreateCombo ('Driver', 120,350,120,20)
    GUICtrlSetData($guiType,'FileSystem|AdapterArguments|FileSystemInterpreter|Process|Shared|Process (Interactive)|Shared (Interactive)')

    $guiErrorCtrlCB = GUICtrlCreateCheckbox ('Fehlerkontrolle: ', 20, 382)
    $guiErrorCtrl = GUICtrlCreateCombo ('Ignorieren', 120,380,120,20)
    GUICtrlSetData($guiErrorCtrl,'Normal|Streng|Kritisch')

    $guiDependOnCB = GUICtrlCreateCheckbox ('Abhängigkeiten: ', 20, 410)
    $guiDependOn = GUICtrlCreateInput ( '', 120, 410, 270, 20)

    $guiPathCB = GUICtrlCreateCheckbox ('', 20, 440, 20, 20)
    $guiPathBtn = GUICtrlCreateButton ( 'Pfad ...', 34, 440, 50, 20, $BS_FLAT)
    GUICtrlSetState($guiPathBtn, $GUI_DISABLE)
    $guiPath = GUICtrlCreateInput ( '', 120, 440, 270, 20)

    $guiUpdateBtn = GuiCtrlCreateButton('Update', 290, 320, 100, 30)
    GUICtrlSetState($guiUpdateBtn, $GUI_DISABLE)

    $guiDelBtn = GuiCtrlCreateButton('Löschen', 290, 360, 100, 30)

    ; =======================
    ; Choice Services/Devices
    ; =======================
    $group2 = GuiCtrlCreateGroup('Dienste / Geräte', 410, 415, 225, 60)
    $radioServices = GUICtrlCreateRadio ( 'Dienste ', 430, 440)
    $radioDevices =  GUICtrlCreateRadio ( 'Geräte ', 540, 440)
    GUICtrlSetState($radioServices, $GUI_CHECKED)

    ;
    GUICtrlSetState($guiDelBtn, $GUI_DISABLE)

    $guiStatus = GuiCtrlCreateLabel('  Geladener Registry-Hive: ' & $baseDir, 0, 478, 640, 17, BitOr($SS_SIMPLE,$SS_SUNKEN))

    GetArray(); Loads Service & Device List from Registry
    GetLists(); Shows Services

    GUISetState()

    ; ==========================
    ; GUI - Loop
    ; ==========================

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
     GUIDelete()
     If $hiveLoaded Then unloadHive($System)
     Exit

    Case $msg = $guiUpdateBtn
     EvtUpdate()

    Case $msg = $guiDelBtn
     EvtDelete()

    Case $msg = $guiPathBtn
     EvtPath()

    Case $msg = $radioServices
     EvtSel()

    Case $msg = $radioDevices
     EvtSel()

    Case $msg = $lvServiceList
     EvtSort($lvServiceList)

    Case $msg = $lvDeviceList
     EvtSort($lvDeviceList)

    Case $msg = $GUI_EVENT_PRIMARYDOWN
     $pos = GUIGetCursorInfo()
     Select
      Case $pos[4] = $lvServiceList
       EvtUpdtOpt($lvServiceList)
      Case $pos[4] = $lvDeviceList
       EvtUpdtOpt($lvDeviceList)
     EndSelect
    EndSelect
    WEnd
    Exit


    ; ***********************
    ; Functions
    ; ***********************
    ; ==========================
    ; GetArray from Registry
    ; ==========================
    Func GetArray()
    DIM $regKey, $regArray[1]
    $i = 1
    $regArray[0]=0

    _GUICtrlListViewDeleteAllItems($lvServiceList)
    _GUICtrlListViewDeleteAllItems($lvDeviceList)

    Do
    $regKey = RegEnumKey($baseKey, $i)
    If @error or ($regKey == '') Then ExitLoop
    $j = RegRead($baseKey & $regKey, 'Type')
    If _ArrayBinarySearch($arrType, $j, 1) Then _ArrayAdd ($regArray, $regKey)
    $i = $i + 1
    Until 0

    $i = UBound($regArray)

    DIM $serviceArray[$i][10]

    $serviceArray[0][0] = $i

    For $j = 1 To $serviceArray[0][0] - 1
    $serviceArray[$j][0] = $regArray[$j]

    $regKey = RegRead ( $baseKey & $regArray[$j], 'Type')
    $i = _ArrayBinarySearch ($arrType, $regKey, 1)
    $serviceArray[$j][1] = $type[1][$i]
    $serviceArray[$j][2] = $type[2][$i]

    $regKey = RegRead ( $baseKey & $regArray[$j], 'DisplayName')
    $serviceArray[$j][3] = $regKey

    $regKey = RegRead ( $baseKey & $regArray[$j], 'Description')
    $serviceArray[$j][4] = $regKey

    $regKey = RegRead ( $baseKey & $regArray[$j], 'Start')
    $serviceArray[$j][5] = $start[$regKey]

    $regKey = RegRead ( $baseKey & $regArray[$j], 'DependOnService')
    $serviceArray[$j][6] = StringReplace($regKey, @LF, ', ')

    $regKey = RegRead ( $baseKey & $regArray[$j], 'ErrorControl')
    $serviceArray[$j][7] = $errorCtrl[$regKey]

    $regKey = RegRead ( $baseKey & $regArray[$j], 'ImagePath')
    $serviceArray[$j][8] = $regKey

    $regKey = RegRead ( $baseKey & $regArray[$j], 'ObjectName')
    $serviceArray[$j][9] = $regKey

    Select
     Case $serviceArray[$j][2]='Service'
      GUICtrlCreateListViewItem($serviceArray[$j][3] & '|' & $serviceArray[$j][0] & '|' & $serviceArray[$j][5] & '|' & $serviceArray[$j][1] & '|' & $serviceArray[$j][4] & '|' & $serviceArray[$j][8] & '|' & $serviceArray[$j][9] & '|' & $serviceArray[$j][7] & '|' & $serviceArray[$j][6], $lvServiceList)
     Case $serviceArray[$j][2]='Device'
      GUICtrlCreateListViewItem($serviceArray[$j][3] & '|' & $serviceArray[$j][0] & '|' & $serviceArray[$j][5] & '|' & $serviceArray[$j][1] & '|' & $serviceArray[$j][4] & '|' & $serviceArray[$j][8] & '|' & $serviceArray[$j][9] & '|' & $serviceArray[$j][7] & '|' & $serviceArray[$j][6], $lvDeviceList)
    EndSelect
    Next
    EndFunc

    ; ==========================
    ; Switch Services/Devices
    ; ==========================
    Func GetLists()
    If GUICtrlRead($radioServices) == $GUI_CHECKED Then
     GUICtrlSetState ($lvServiceList, $GUI_SHOW + $GUI_ENABLE)
     GUICtrlSetState ($lvDeviceList, $GUI_HIDE + $GUI_DISABLE)
    Else
     GUICtrlSetState ($lvServiceList, $GUI_HIDE + $GUI_DISABLE)
     GUICtrlSetState ($lvDeviceList, $GUI_SHOW + $GUI_ENABLE)
    EndIf
    EndFunc


    ;******************
    ; Eventhandling
    ;******************
    Func EvtUpdate()
    ; get SECTION and DISPLAYNAME of the Service
    If GUICtrlRead($radioServices) == $GUI_CHECKED Then
    $pos = _GUICtrlListViewGetCurSel ($lvServiceList)
    $i = _GUICtrlListViewGetItemText($lvServiceList, $pos, 1)
    $j = '(' & _GUICtrlListViewGetItemText($lvServiceList, _GUICtrlListViewGetCurSel ($lvServiceList), 0) & ')'
    Else
    $pos = _GUICtrlListViewGetCurSel ($lvDeviceList)
    $i = _GUICtrlListViewGetItemText($lvDeviceList, $pos, 1)
    $j = '(' & _GUICtrlListViewGetItemText($lvDeviceList, _GUICtrlListViewGetCurSel ($lvDeviceList), 0) & ')'
    EndIf
    If MsgBox(36, 'Update Parameter', 'Möchten Sie die Einstellungen für diesen Dienst wirklich ändern: ' &  @LF &  @LF & $i & ' ' & $j) = 6 Then
    $msg = ''
    If GUICtrlRead($guiStartCB) == $GUI_CHECKED Then
     $msg = $msg & $baseKey & $i & ' [Start], REG_DWORD: ' & _GUICtrlComboGetCurSel($guiStart) & @LF
     RegWrite($baseKey & $i, 'Start', 'REG_DWORD', _GUICtrlComboGetCurSel($guiStart))
    EndIf
    If GUICtrlRead($guiTypeCB) == $GUI_CHECKED Then
     $msg = $msg & $baseKey & $i & ' [Type], REG_DWORD: ' & $type[0][_GUICtrlComboGetCurSel($guiType)+1] & @LF
     RegWrite($baseKey & $i, 'Type', 'REG_DWORD', $type[0][_GUICtrlComboGetCurSel($guiType)+1])
    EndIf
    If GUICtrlRead($guiErrorCtrlCB) == $GUI_CHECKED Then
     $msg = $msg & $baseKey & $i & ' [ErrorControl], REG_DWORD: ' & _GUICtrlComboGetCurSel($guiErrorCtrl) & @LF
     RegWrite($baseKey & $i, 'ErrorControl', 'REG_DWORD', _GUICtrlComboGetCurSel($guiErrorCtrl))
    EndIf
    If GUICtrlRead($guiDependOnCB) == $GUI_CHECKED Then
     $msg = $msg & $baseKey & $i & ' [DependOnService], REG_MULTI_SZ: ' & GUICtrlRead($guiDependOn) & @LF
     RegWrite($baseKey & $i, 'DependOnService', 'REG_MULTI_SZ', StringReplace(StringReplace(GUICtrlRead($guiDependOn), ',', @LF), ' ', ''))
    EndIf
    If GUICtrlRead($guiPathCB) == $GUI_CHECKED Then
     $msg = $msg & $baseKey & $i & ' [ImagePath], REG_EXPAND_SZ: ' & GUICtrlRead($guiPath) & @LF
     RegWrite($baseKey & $i, 'ImagePath', 'REG_EXPAND_SZ', GUICtrlRead($guiPath))
    EndIf

    ;  MsgBox (64, 'Updated Registry Values', $msg); & @LF & RegRead($baseKey & $i, 'DependOnService'))

    ; renew Listview
    GetArray()
    EvtSel()
    EndIf
    EndFunc

    Func EvtDelete()
    ; get SECTION and DISPLAYNAME of the Service
    If GUICtrlRead($radioServices) == $GUI_CHECKED Then
    $pos = _GUICtrlListViewGetCurSel ($lvServiceList)
    $i = _GUICtrlListViewGetItemText($lvServiceList, $pos, 1)
    $j = '(' & _GUICtrlListViewGetItemText($lvServiceList, _GUICtrlListViewGetCurSel ($lvServiceList), 0) & ')'
    Else
    $pos = _GUICtrlListViewGetCurSel ($lvDeviceList)
    $i = _GUICtrlListViewGetItemText($lvDeviceList, $pos, 1)
    $j = '(' & _GUICtrlListViewGetItemText($lvDeviceList, _GUICtrlListViewGetCurSel ($lvDeviceList), 0) & ')'
    EndIf
    If MsgBox(36, 'Delete Service/Device', 'Möchten Sie diesen Dienst wirklich löschen: ' &  @LF &  @LF & $i & ' ' & $j) = 6 Then
    RegDelete($baseKey & $i)

    ; renew Listview
    GetArray()
    EvtSel()
    EndIf
    EndFunc

    Func EvtPath(); Select path and file for Service
    DIM $file = FileOpenDialog( 'Dienst auswählen', $baseDir, 'Dienste (*.exe; *.dll; *.sys)')
    If @error Then
    MsgBox(4096,'Fehler','Keine Datei(en) gewählt!')
    Else
    GUICtrlSetData ($guiPath, $file)
    EndIF
    EndFunc

    Func UnChk(); Helper
    GUICtrlSetState($guiStartCB, $GUI_UNCHECKED)
    GUICtrlSetState($guiTypeCB, $GUI_UNCHECKED)
    GUICtrlSetState($guiErrorCtrlCB, $GUI_UNCHECKED)
    GUICtrlSetState($guiPathCB, $GUI_UNCHECKED)
    GUICtrlSetState($guiDependOnCB, $GUI_UNCHECKED)
    GUICtrlSetData($guiPath,'')
    GUICtrlSetData($guiDependOn,'')
    EndFunc

    Func BtnDisable(); Helper
    GUICtrlSetState($guiPathBtn, $GUI_DISABLE)
    GUICtrlSetState($guiUpdateBtn, $GUI_DISABLE)
    GUICtrlSetState($guiDelBtn, $GUI_DISABLE)
    EndFunc

    Func BtnEnable(); Helper
    GUICtrlSetState($guiPathBtn, $GUI_ENABLE)
    GUICtrlSetState($guiUpdateBtn, $GUI_ENABLE)
    GUICtrlSetState($guiDelBtn, $GUI_ENABLE)
    EndFunc

    Func EvtSel(); Renew View -> displays Services/Devices
    If GUICtrlRead($radioServices) == $GUI_CHECKED Then
    _GUICtrlListViewSetItemSelState($lvDeviceList, _GUICtrlListViewGetCurSel($lvDeviceList), 0)
    Else
    _GUICtrlListViewSetItemSelState($lvServiceList, _GUICtrlListViewGetCurSel($lvServiceList), 0)
    EndIf
    UnChk()
    BtnDisable()
    GetLists()
    EndFunc

    Func EvtUpdtOpt(ByRef $listview); Update Option section after selection of a Service/Device
    If _GUICtrlListViewGetCurSel($listview) <> $LV_ERR Then
    UnChk()
    BtnEnable()
    DIM $id = _GUICtrlListViewGetCurSel ($listview)
    If $id <> -1 Then
     _GUICtrlComboSelectString($guiStart, 0, _GUICtrlListViewGetItemText($listview, $id, 2))
     _GUICtrlComboSelectString($guiType, 0, _GUICtrlListViewGetItemText($listview, $id, 3))
     _GUICtrlComboSelectString($guiErrorCtrl, 0, _GUICtrlListViewGetItemText($listview, $id, 7))
     GUICtrlSetData ($guiDependOn, _GUICtrlListViewGetItemText($listview, $id, 8))
     GUICtrlSetData ($guiPath, _GUICtrlListViewGetItemText($listview, $id, 5))
    EndIf
    EndIf
    EndFunc

    Func EvtSort(ByRef $listview); sort Service/Device list by the column header clicked on
    UnChk()
    BtnDisable()
    Dim $DESCENDING[_GUICtrlListViewGetSubItemsCount ($listview)]
    _GUICtrlListViewSort($listview, $DESCENDING, GUICtrlGetState($listview))
    EndFunc

    ;***************************
    ;Load Hives
    ;***************************

    Func Load()
    $FixedDrives = getFixedDrives($FixedDrives)
    $WinDir = getWinDir($FixedDrives)
    $System = findSystem($WinDir)
    $baseDir = $System
    loadHive ($System)

    $i = RegRead ('HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\Select\','Current')
    $baseKey = 'HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM\ControlSet00' & $i & '\Services\'
    EndFunc

    Func loadDLLs ( )
    If Not FileExists ( @AppDataCommonDir & '\Services' ) Then

    SplashTextOn ( 'Dienste und Geräte', @LF & 'Lade benötigte DLL-Dateien ...', 300, 50, @DesktopWidth/2-150, @DesktopWidth/2, -1, "Arial", 10 )
    DirCreate ( @AppDataCommonDir & '\Services' )
    RunWait ( 'regsvr32.exe /s /i shell32.dll' )
    RunWait ( 'regsvr32.exe /s mlang.dll' )
    RunWait ( 'regsvr32.exe /s /i browseui.dll' )
    RunWait ( 'regsvr32.exe /s msxml.dll' )
    RunWait ( 'regsvr32.exe /s /i mshtml.dll' )
    RunWait ( 'regsvr32.exe /s /i shdocvw.dll' )
    SplashOff ( )

    EndIf
    EndFunc

    ;Get an array of the fixed drives available
    Func getFixedDrives ( $FixedDrives )
    Dim $list = ''

    $FixedDrives = DriveGetDrive ( 'FIXED' )
    If $FixedDrives[0] < 1 Then
    MsgBox (16, 'Fehler', 'Keine Festplatten gefunden!')
    Exit
    EndIf
    return $FixedDrives
    EndFunc

    ;Retrieve remote Windows directory from the user, which will be
    ;used for guessing where to locate the registry hives for editing
    Func getWinDir ( $FixedDrives )
    Dim $result

    ;Start at 'My Computer'
    $result = FileSelectFolder ('Bitte wählen Sie das lokale Windows-Verzeichnis ...', '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}', 0 )
    If @error = 1 Then
    MsgBox ( 16, 'Fehler', 'Fehler bei der Auswahl des lokalen Windows-Verzeichnisses!' )
    Exit
    EndIf
    return $result
    EndFunc

    ;Retrieve location of the System registry hive from the user
    Func findSystem ( $WinDir )
    Dim $result

    $result = FileOpenDialog ('Bitte wählen Sie den lokalen SYSTEM-Hive!', $WinDir & '\system32\config', 'All (*.*)', 3, 'system' )
    If @error = 1 Then
    MsgBox ( 16, 'Fehler', 'Fehler bei der Auswahl des lokalen SYSTEM-Hive!' )
    Exit
    EndIf
    return $result
    EndFunc

    ;Load the hive!
    Func loadHive ($System)
    Dim $result

    ;Load System hive
    SplashTextOn ( 'Dienste und Geräte', @LF & 'Lade lokalen SYSTEM-Hive' & @CRLF & $System & @CRLF & ' als HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM ...',  400, 80, @DesktopWidth/2-200, @DesktopWidth/2, -1, "Arial", 10 )
    $result = RunWait( 'reg.exe LOAD HKLM\_REMOTE_SYSTEM "' & $System & '"', '', @SW_HIDE )
    If $result = 1 Then;failed to load for some reason!
    MsgBox ( 16, 'Fehler', 'Der lokale SYSTEM-Hive konnte nicht geladen werden!' )
    unloadHive ( $System )
    Exit
    EndIf
    SplashOff()
    EndFunc

    ;Unload the hive!
    Func unloadHive ($System)
    SplashTextOn ( 'Dienste und Geräte', @LF & 'Sichere' & @CRLF & 'HKEY_LOCAL_MACHINE\_REMOTE_SYSTEM ...',  400, 70, @DesktopWidth/2-200, @DesktopWidth/2, -1, "Arial", 10 )
    RunWait( 'reg.exe UNLOAD HKLM\_REMOTE_SYSTEM', '', @SW_HIDE  )
    If @error Then MsgBox(16, 'Fehler','Fehler beim Sichern des SYSTEM-Hives')
    SplashOff()
    EndFunc
good work ... keep it on wink.gif

reagrds,
nyphis


--------------------
www.pebuilder.de - German PEBuilder Forum
Go to the top of the page
 
+Quote Post
korale
post Aug 5 2005, 08:53 AM
Post #6


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



Updated script code...

Please try out and write a comment. i only tested on my own computer and everything seamed to work ok.
Go to the top of the page
 
+Quote Post
nyphis
post Aug 5 2005, 10:13 AM
Post #7


Member
**

Group: Members
Posts: 64
Joined: 25-October 03
From: Germany
Member No.: 2,195



the new Gui looks good ...

but I am not able to update service parameters ... if I click on "Update":
CODE
Do you really want to update parameters for the Service:

-1 (-1)
(the name is not correctly displayed) ... and nothing happens and the options-window remains open ...


and if I re-sort the list the buttons for update and deletion won't work anymore ...


some further wishes of mine ...
- could you add quick infos to the buttons?
- disable the button (services/devices) that is active (if the list shows the services disable the services-button)
- add a heading for the displayed list ... right now an unkown user doesn't know, what list he looks at


regards,
nyphis


--------------------
www.pebuilder.de - German PEBuilder Forum
Go to the top of the page
 
+Quote Post
korale
post Aug 6 2005, 05:06 AM
Post #8


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



fixed the bug (i hope biggrin.gif)
see first post.
Go to the top of the page
 
+Quote Post
d4vr0s
post Aug 6 2005, 08:38 AM
Post #9


911cd's Boyscout
*****

Group: Members
Posts: 3,110
Joined: 18-November 03
From: Skaro
Member No.: 2,631



@korale
Would you check the 'Add the 'Edit by' line in this post?' box if you're updating the original post please? smile.gif
It will show the date and time at the bottom when you do this. biggrin.gif

This post has been edited by d4vr0s: Aug 6 2005, 08:39 AM


--------------------
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams

Problems? Check the Troubleshooting FAQ
Go to the top of the page
 
+Quote Post
nyphis
post Aug 6 2005, 08:57 AM
Post #10


Member
**

Group: Members
Posts: 64
Joined: 25-October 03
From: Germany
Member No.: 2,195



jepp ... now it works ...

but please add the disabling of the list buttons that are active ...
CODE
; ==========================
; Set Services or Devices
; ==========================
Func SetList(ByRef $listview)
If $listview == $lvServiceList Then
 GUICtrlSetState ($lvServiceList, $GUI_SHOW + $GUI_ENABLE)
 GUICtrlSetState ($lvDeviceList, $GUI_HIDE + $GUI_DISABLE)
 GUICtrlSetState ($guiServicesBtn, $GUI_DISABLE)
 GUICtrlSetState ($guiDevicesBtn, $GUI_ENABLE)
 $isSrv = 1
Else
 GUICtrlSetState ($lvServiceList, $GUI_HIDE + $GUI_DISABLE)
 GUICtrlSetState ($lvDeviceList, $GUI_SHOW + $GUI_ENABLE)
 GUICtrlSetState ($guiServicesBtn, $GUI_ENABLE)
 GUICtrlSetState ($guiDevicesBtn, $GUI_DISABLE)
 $isSrv = 2
EndIf
EndFunc


is it possible to close the GUI's (new / change service/device and log file) by ESC-button?

regards,
nyphis


--------------------
www.pebuilder.de - German PEBuilder Forum
Go to the top of the page
 
+Quote Post
korale
post Aug 25 2005, 06:54 AM
Post #11


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



Updated the autoit script.
see changes in first post.

@nyphis
did not include your suggestion. some other parts of the code must be changed too if you do so. i thought it's not nessesary because it's just cosmetics.
anyway thanx for your response to my work
Go to the top of the page
 
+Quote Post
loginger
post Aug 26 2005, 09:39 PM
Post #12


Newbie
*

Group: Members
Posts: 1
Joined: 26-August 05
Member No.: 13,639



Wow! Great script. (hammer geil!l has done it's job in daily business...
substitutes erd commander :-)

greats Loginger
Go to the top of the page
 
+Quote Post
korale
post Sep 6 2005, 05:51 AM
Post #13


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



added a screenshot (hope it works) and a link to a compiled version
Go to the top of the page
 
+Quote Post
webmedic
post Sep 6 2005, 11:33 AM
Post #14


Gold Member
****

Group: Members
Posts: 612
Joined: 26-August 03
Member No.: 1,504



I have not looked at this yet but have downloaded it. I finally got around to fixing the old autoit plugin by frodo I think it was. For some reason it would reject the registry entries so I have my autorun bat setup to automaticly load all the reg files it finds in system32 at boot and with this you can simply click on an au3 script and it will run under bartpe without having to compile them.

At any rate I'm looking forward to taking a look at this. Thanks for the script.
Go to the top of the page
 
+Quote Post
FeReNGi
post Sep 21 2005, 08:09 AM
Post #15


Silver Member
***

Group: Members
Posts: 458
Joined: 9-February 05
From: Belgium
Member No.: 10,122



Works fine THNX!
Go to the top of the page
 
+Quote Post
Former_footslong_post
post Oct 3 2005, 03:13 PM
Post #16





Guests






Could you please re-post the exe. The hosting period has expired.

TIA

footslong wink.gif
Go to the top of the page
 
+Quote Post
korale
post Oct 5 2005, 02:49 AM
Post #17


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



updated the download links. see first post...

maybe someone can host the file permanently so i don't need to update.

by the way, feel free to modify the code or make some suggestions.
Go to the top of the page
 
+Quote Post
sanbarrow
post Oct 5 2005, 05:24 PM
Post #18


Platinum Member
*****

Group: Members
Posts: 1,086
Joined: 22-October 04
From: Sauerland
Member No.: 8,020



QUOTE (korale @ Oct 5 2005, 07:49 AM)
updated the download links. see first post...

maybe someone can host the file permanently so i don't need to update.

by the way, feel free to modify the code or make some suggestions.
*


@ korale

I can host this for you if you still need it.

Ulli
Go to the top of the page
 
+Quote Post
korale
post Oct 12 2005, 08:34 AM
Post #19


Member
**

Group: Members
Posts: 48
Joined: 14-April 04
Member No.: 5,329



@sanbarrow

feel free to host the file. cool.gif
Go to the top of the page
 
+Quote Post
hilander999
post Oct 14 2005, 06:39 PM
Post #20


Platinum Member
*****

Group: Members
Posts: 2,277
Joined: 20-September 03
From: Earth: It's the little blue planet circling the Sun in the Milky Way Galaxy.
Member No.: 1,729



QUOTE (webmedic @ Sep 6 2005, 11:33 AM)
I have not looked at this yet but have downloaded it. I finally got around to fixing the old autoit plugin by frodo I think it was. For some reason it would reject the registry entries so I have my autorun bat setup to automaticly load all the reg files it finds in system32 at boot and with this you can simply click on an au3 script and it will run under bartpe without having to compile them.

At any rate I'm looking forward to taking a look at this. Thanks for the script.
*
Please post the working plugin for autoit.


--------------------
Free stuff:

Official BTS Driverpack Support for bartpe

The Ultimate Boot CD for Windows: Forum

--------------------------------------------------------------------------------------------------------------
Please remember to use the SEARCH engine before posting new topics.
Also remember to select "All Forums" & "Show results as posts" in the options.

--------------------------------------------------------------------------------------------------------------
"When one's words are not better than silence, One should remain silent." ~ Kwai Chang Caine
Go to the top of the page
 
+Quote Post

9 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2nd September 2010 - 04:16 PM