Author Topic: streamlined xp pro question  (Read 585 times)

Offline Gtmaw

  • Zinc Member
  • *
  • Posts: 2
streamlined xp pro question
« on: March 11, 2005, 05:52:06 PM »
Is it possible to setup a user account in XP Pro for aces high,  that would disable running processes and other programs from running at startup?

Offline Siaf__csf

  • Gold Member
  • *****
  • Posts: 2213
streamlined xp pro question
« Reply #1 on: March 12, 2005, 12:51:57 AM »
I think most of the services are started already before login so for that part, no. Post-login processes you can harvest away.

Of course if you want to go to extreme, you can build a dual-boot system which will boot a crippled XP just for AH. But I'm wondering what's the point? Is your hadrware so antiquated that it can't handle standard XP?

Offline Seeker

  • Parolee
  • Gold Member
  • *****
  • Posts: 2653
streamlined xp pro question
« Reply #2 on: March 12, 2005, 03:56:36 AM »
Not directly; because you're trying to manipulate machine settings using a user variable.

Your best bet is to use a log in script for the account in question which applies machine settings on a user basis.

It's not the easiest thing to do; here's a complex example :

'######################################
'# getComputer returns this computers
'# name.
Function getComputer()
   Set WSHNetwork = WScript.CreateObject("WScript.Network")
   strComputer = ""
   While strComputer = ""
      strComputer = WSHNetwork.ComputerName
   Wend
   getComputer = strComputer
End Function


'######################################
'# getUser returns the current user.
Function getUser()
   Set WSHNetwork = WScript.CreateObject("WScript.Network")
   strUser = ""
   While strUser = ""
      strUser = WSHNetwork.UserName
   Wend
   getUser = strUser
End Function


'######################################
'# getComputerADsPath returns the AD
'# path of the current computer.
Function getComputerADsPath()
   computer = getComputer()
   Set objConnection = CreateObject("ADODB.Connection")
   objConnection.Open "Provider=ADsDSOObject;"

   Set objCommand = CreateObject("ADODB.Command")
   objCommand.ActiveConnection = objConnection

   objCommand.CommandText = _
      ";" & _
      "(&(objectCategory=Computer)(cn=" & computer & "));" & _
      "ADsPath;subtree"

   Set objRecordSet = objCommand.Execute

   While Not objRecordSet.EOF
      strADsPath = objRecordSet.Fields("ADsPath")
      Set objComputer = GetObject(strADsPath)
      objRecordSet.MoveNext
   Wend

   objConnection.Close
   getComputerADsPath = strADsPath
End Function


'######################################
'# regTest returns the result of a
'# regular expression pattern test.
Function regTest(pattern, sStr)
   Dim regEx
   Set regEx = New RegExp
   regEx.Pattern = pattern
   regEx.IgnoreCase = True
   regTest = regEx.Test(sStr)
End Function


'######################################
'# mapDrive maps a network share to a
'# drive letter.
Sub mapDrive(drive, share)
   Set Net = CreateObject("WScript.Network")
   Set colDrv = Net.EnumNetworkDrives
   For i = 0 To colDrv.Count - 1 Step 2
      If (colDrv(i) = drive) Then
         Net.RemoveNetworkDrive drive
      End If
   Next
   Net.MapNetworkDrive drive, share
End Sub


'######################################
'# mkShortcut creates a shortcut on the
'# Desktop.
Sub mkShortcut(lnkName, path, param)
   Set wsShell = CreateObject("WScript.Shell")
   targetFolder = wsShell.SpecialFolders("Desktop")
   Set shortCut = wsShell.CreateShortcut(targetFolder & _
      "\" & lnkName & ".lnk")
   shortCut.TargetPath = path
   shortCut.Arguments = param
   shortCut.Save
End Sub


'######################################
'# isMember returns true if user is
'# member of the group.
Function isMember(strGroup, strUser, strDomain)
   Dim objMember, objGroup
   On Error Resume Next
   ' Initialize vars
   ' Get reference to scanned group, if it can connect, it is a group
   Set objGroup = GetObject("WinNT://" & strDomain & "/" & _
      strGroup & ",group")
   
   ' Is the given scanned group really a group?
   ' Check error of the line above
   If Err.Number = 0 Then
      ' Is the searched user a direct member of the group?
      ' No recursive checking here
      isMember = objGroup.isMember("WinNT://" & strDomain & "/" & _
         strUser)
      If Not isMember Then
         ' Search the nesting groups
         For Each objMember In objGroup.Members
            ' Recursive funtion call
            isMember = isMember(objMember.Name, strUser, _
               strDomain)
            ' Membership found, exit loop
            If isMember Then Exit For
         Next ' For Each objMember In
            'objGroup.Members
      End If ' If Not IsMember
   Else ' If Err.Number = 0
      ' Can't search in a user -> no group
      isMember = False
   End If ' If Err.Number = 0
   On Error Goto 0
End Function


'######################################
'# setUserSettings set user settings in
'# the registry database
Sub setUserSettings()
    HKEY_CURRENT_USER = &H80000001
    strComputer = "."
    Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

    ' Slå screen saver fra.
    strKeyPath = "Control Panel\Desktop"
    objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
    ValueName = "ScreenSaveActive"
    strValue = "0"
    objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValue

    ' Sæt start og search page i Internet Explorer
    strKeyPath = "Software\Microsoft\Internet\Explorer\Main"
    objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
    objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, "Start Page", "http://www.kk.dk"
    objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, "Search Page", "http://www.kk.dk"
End Sub


'####################################################################
'# Main

'######################################
'# Undersøg hvilken OU denne computer
'# er placeret i.
computerPath = getComputerADsPath

' Generer WScript.Shell objekt til senere brug.
Set wsShell = CreateObject("WScript.Shell")

'######################################
'# Maskinerne i byrådssalen.
If regTest("ou=Klienter i salen,ou=Byrådssalen", computerPath) Then
    ' Map Minolta netværks printeren på Loggia.
    Set Net = CreateObject("WScript.Network")
    Net.AddWindowsPrinterConnecti on "\\okfprt1\brsal_minolta"
    Net.SetDefaultPrinter "\\okfprt1\brsal_minolta"

    ' Slet alle filer på skrive bordet.
    targetFolder = wsShell.SpecialFolders("Desktop")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    objFSO.DeleteFile(targetFolder & "\*"), True

    ' Ret registry hvis maskinen er placeret under Byrådssalen.
    If regTest("ou=Klienter i salen,ou=Byrådssalen", computerPath) Then
        setUserSettings
    End If

    ' Ordstyrer.
    If regTest("ou=Ordstyrer,ou=Afstemnings klienter på podiet,ou=Klienter i salen,ou=Byrådssalen", _
        computerPath) Then
   mapDrive "H:", "\\votebox1\podiet$"
   mkShortcut "Attend ordstyrer", "H:\AttendSek.exe", _
       "H:\AttendOrdstyrer.ini"
   If Not isMember("PermAfstemSetup", getUser, "of.kk.dk") Then
       wsShell.Run "H:\AttendSek.exe H:\AttendOrdstyrer.ini"
   End IF
    End If

    ' 1. sekretær.
    If regTest("ou=1. sekretær,ou=Afstemnings klienter på podiet,ou=Klienter i salen,ou=Byrådssalen", _
   computerPath) Then
        mapDrive "H:", "\\votebox1\podiet$"
        mkShortcut "Attend 1. sekretær", "H:\AttendSek.exe", _
       "H:\Attend1Sekretær.ini"
        If Not isMember("PermAfstemSetup", getUser, "of.kk.dk") Then
       wsShell.Run "H:\AttendSek.exe H:\Attend1Sekretær.ini"
        End IF
    End If

    ' 2. sekretær.
    If regTest("ou=2. sekretær,ou=Afstemnings klienter på podiet,ou=Klienter i salen,ou=Byrådssalen", _
   computerPath) Then
   mapDrive "H:", "\\votebox1\podiet$"
   mkShortcut "Attend 2. sekretær", "H:\AttendSek.exe", _
       "H:\Attend2Sekretær.ini"
   If Not isMember("PermAfstemSetup", getUser, "of.kk.dk") Then
       wsShell.Run "H:\AttendSek.exe H:\Attend2Sekretær.ini"
   End IF
    End If

    ' Almindelige afstemingsklienter i salen.
    If regTest("ou=Afstemnings klienter for medlemmer,ou=Klienter i salen,ou=Byrådssalen", _
   computerPath) Then
   mapDrive "H:", "\\votebox1\medlem$"
   mkShortcut "Attend", "H:\AttendMed.exe", ""
    End If

    ' Maskinen i teknik rummet.
    If regTest("ou=Teknik rummet,ou=Byrådssalen", _
   computerPath) Then
   mapDrive "H:", "\\votebox1\teknik$"
   mkShortcut "Attend teknik", "H:\AttendSts.exe", ""
    End If

    '######################################
    '# Hvis brugeren har setup rettigheder
    '# så map Afstemningsshare og tilføj
    '# shortcut.
    If isMember("PermAfstemSetup", getUser, "of.kk.dk") Then
   mapDrive "S:", "\\votebox1\afstemningssystemet$"
   mkShortcut "Attend konfiguration", "S:\Tools\", ""
    End If
End If

Offline FOGOLD

  • Silver Member
  • ****
  • Posts: 1886
streamlined xp pro question
« Reply #3 on: March 12, 2005, 04:58:21 AM »
Personally, I've found that tweaking out these processes a-la-black viper doesn't actually make that much difference.

Certain ones do, but I really don't think it's worth getting really anal about it.

My system is just getting plain tired no matter how I tweak:rolleyes:

(XP2000 Gig RAM 9800Pro)

Offline aztec

  • Silver Member
  • ****
  • Posts: 1800
streamlined xp pro question
« Reply #4 on: March 12, 2005, 09:44:28 AM »
I can't believe I read all that Seeker...I'm sending you the bill for the Excedrin;)  ! Old friend.

Offline Kev367th

  • Platinum Member
  • ******
  • Posts: 5290
streamlined xp pro question
« Reply #5 on: March 12, 2005, 01:12:08 PM »
Could also do it with a Group Policy that disables all the services not needed and applying the Group Policy to a specific user.
AMD Phenom II X6 1100T
Asus M3N-HT mobo
2 x 2Gb Corsair 1066 DDR2 memory

Offline DAVENRINO

  • Silver Member
  • ****
  • Posts: 1084
streamlined xp pro question
« Reply #6 on: March 12, 2005, 01:38:21 PM »
Why don't you just use this great app to SAFELY shut  them down temporarily?  Also turns em back on when you log out so you don't forget and hit the internet unprotected by AV and firewall.  I also have over 20 services permanently disabled.

http://www.kensalter.com/fsautostart/index.htm
DAVE aka DJ229-AIR MAFIA
CH USB HOTAS/ONKYO 705 7.2 SURROUND SOUND/ 60" SONY A3000 SXRD  TV

Offline Seeker

  • Parolee
  • Gold Member
  • *****
  • Posts: 2653
streamlined xp pro question
« Reply #7 on: March 13, 2005, 08:04:17 AM »
Hiya Aztec :-)

Offline Siaf__csf

  • Gold Member
  • *****
  • Posts: 2213
streamlined xp pro question
« Reply #8 on: March 13, 2005, 09:03:38 AM »
The bottom point is that a computer that can't handle an XP for games is a computer that should not have it installed in the first place.

Offline Kev367th

  • Platinum Member
  • ******
  • Posts: 5290
streamlined xp pro question
« Reply #9 on: March 13, 2005, 09:59:29 AM »
Quote
Originally posted by Siaf__csf
The bottom point is that a computer that can't handle an XP for games is a computer that should not have it installed in the first place.


So true.
AMD Phenom II X6 1100T
Asus M3N-HT mobo
2 x 2Gb Corsair 1066 DDR2 memory

Offline DAVENRINO

  • Silver Member
  • ****
  • Posts: 1084
streamlined xp pro question
« Reply #10 on: March 13, 2005, 12:44:11 PM »
LOL,
My Jeep is capable of dragging a couple tons of garbage  behind it, but why would I do that when it performs much better without it.:D
DAVE aka DJ229-AIR MAFIA
CH USB HOTAS/ONKYO 705 7.2 SURROUND SOUND/ 60" SONY A3000 SXRD  TV

Offline StarOfAfrica2

  • Platinum Member
  • ******
  • Posts: 5162
      • http://www.vf-17.org
streamlined xp pro question
« Reply #11 on: March 13, 2005, 05:31:54 PM »
I set mine up with two hard drives.  The XP rules just say I can only have it installed on one computer, it doesnt say a darn thing about installing it more than once on the same computer (even more than once at a time :) ).  The "main" drive has my autoupdates on, A/V, firewall, port manager, etc.  This is the setup I use for web browsing, email, downloading, and so on.  The other setup is strictly for AH.  The only thing installed on that drive besides Windows and driver programs for the video card is AHII.  It has 11 processes running at startup.  I also have a partition on this hard drive with a backup of my main drive.

Offline Gtmaw

  • Zinc Member
  • *
  • Posts: 2
streamlined xp pro question
« Reply #12 on: March 14, 2005, 04:24:47 PM »
Thanks for the help all, I'm going to use a second hard drive to boot with. There's nothing on it so... may as well give it try. I don't have any problems running xp, i was just looking for a way to run AH without disabling a ton of other stuff. Thanks again!

Offline StarOfAfrica2

  • Platinum Member
  • ******
  • Posts: 5162
      • http://www.vf-17.org
streamlined xp pro question
« Reply #13 on: March 14, 2005, 05:15:47 PM »
Aye, thats why I use the 2 HD configuration.  I can disable stuff to my heart's content on the AH drive, and not worry about if it messes up the Windows functions.  As long as I have networking, video, sound and a basic OS in place, I'm happy for gaming.  In a pinch IE still works, although I try not to need it while I'm logged in on that account (since I dont have A/V or firewall, just the router firewall).