mesteele101
Members-
Posts
27 -
Joined
-
Last visited
Reputation
0 NeutralAbout mesteele101

Personal Information
-
Occupation
Owner
-
Location
USA
-
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
Here is the complete script. I have't added the 'case' to it. I'm having a couple of problems: 1) It seems to be looping through some of the routines. 2) If the user has to be created then the HKCU registry settings that are being created won't apply for the newly created user There might be better ways to code some of the routines All I can do with this type of code is hack at it. On Error Resume Next Dim objWShell Set objWShell = WScript.CreateObject("WScript.Shell") getVersionNumber = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion") getOsType = objWShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") getProductName = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") ComputerName = "WinIDS" accUserName = "Cracker" accUserPass = "p@ss" 'This tests for x86 processor architecture, and exits if not. Install is not 64bit capable. If getOsType = "x86" Then 'This tests for Windows Windows 7 (6.1), and continues script if not. If getVersionNumber = "6.1" Then msgbox "Version detected is : " & getVersionNumber 'This forces UAC to be disabled during script execution. If WScript.Arguments.length =0 Then Set objShell = CreateObject("Shell.Application") objShell.ShellExecute "wscript.exe", Chr(34) & _ WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1 Else 'Sets registry to disable ELUA, Show Hidden files and folders, and display file extensions. objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA", "0", "REG_DWORD" 'The below two can not be created for user Operator if that account has to be created. objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD" 'This changes the computer name for Windows 7. Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colComputers = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") objComputer = "." For Each objComputer In colComputers err = objComputer.Rename(ComputerName) Next Set objWMIService = Nothing Set colComputera = Nothing End if ElseIf getVersionNumber = "5.1" or getVersionNumber = "5.2" Then msgbox "Version detected is : " & getVersionNumber 'This sets registry to Show Hidden files and folders, and display file extensions. 'The below two can not be created for user Operator if that account has to be created. objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD" 'This changes the computer name for Windows XP or Windows Server 2003. objWShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName", computerName objWShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\ParameterS\NV Hostname", computerName Else Msgbox "The OS Product Name is " & getProductName & ", and is not supported!" & VbCrLf & VbCrLf & "Supported Product Names: XP SP3, Server 2003 SP2, and Windows 7",vbokonly,"Detecting Product Name..." WScript.Quit End If Else Msgbox "The detected processor architecture is: " & getOsType & VbCrLf & VbCrLf & "The WinIDS install only supports 32bit architecture at this time!",vbokonly,"Detecting Processor Architecture..." WScript.Quit End If 'This tests for a specific username and creates a user account if it does not exist. msgbox "Checking for " & accUserName & " , and creating if not found." QueryForUser(accUserName) 'This reates the new username if it doesn't exist Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName Set objComputer = GetObject("WinNT://" &strComputer) Set colAccounts = GetObject("WinNT://" & strComputer & "") Set objUser = colAccounts.Create("user", accUserName) objUser.SetPassword accUserPass objUser.Put "UserFlags", 65600 objUser.SetInfo 'This adds user to Administrators group msgbox "Creating new user " & accUserName & " , and adding to Administrators group!" Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group") Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ",user") objGroup.Add(objUser.ADsPath) 'This changes the password if the user exists Sub QueryForUser(accUserName) Set objlocal = GetObject("WinNT://.") objlocal.Filter = Array("user") For Each User In objlocal If lcase(User.Name) = lcase(accUserName) Then strComputer = "." Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ", user") msgbox "User " & accUserName & "exists and adding password." objUser.SetPassword accUserPass objUser.SetInfo 'This checks to see if the user needs added to the Administrators Group Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators") For Each objUser in objGroup.Members If objUser.Name = accUserName Then IsAdmin = "1" End If Next if IsAdmin <> "1" Then msgbox "Adding existing user " & accUserName & " to Administrator group." Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group") Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ",user") objGroup.Add(objUser.ADsPath) End If End If Next End Sub 'This restarts OS in 10 seconds to apply changes. msgbox "End of script!" 'objWShell.Run "shutdown /r /t 10 /f /d P:4:2" Set objWShell = Nothing I do really appreciate the expert help. -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
This is all local. There are two sections of this part of the script. Section one: The user Operator does not exist it 1) Creates the Operator account 2) Sets the password 3) Sets the password to never expire 4) Add the user Operator to the Administrators group 5) Jumps over the next section If the user Operator already exists then 1) It sets the password 2) Sets the password to never expire 3) It checks see if the user Operator belongs to the Administrators group, and jumps over if it does With Item 3 above there may be a better way to do it? If the usrer operator already belongs to the Administrators group the script gets an error, so I added a check. There is most likely a better way to do this? The script below works as is. However if it needs to create the Operator user, the registry settings cannot be set for Operator because you can only set those using the HKCU registry. I'm not real sure how to do this. I was thinking to set those in the Administrators group policies. If the Operator account does not exisit then have it do section 1 and then ave a msgbox popup telling the installer that after the reboot they will need to log back using the newly created Operator account, and run the script again. After logging back in using the Operator account the script would check to see if the current user name, password, and group assignment was set correctly, and then bypass that part of the script. The installer would only need to reboot if section one was executed. With section two the user Operator already exists and the script could continue on. On Error Resume Next Dim objWShell Set objWShell = WScript.CreateObject("WScript.Shell") getVersionNumber = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion") getOsType = objWShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") getProductName = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") ComputerName = "WinIDS" accUserName = "Operator" accUserPass = "p@ss" 'This tests for x86 processor architecture, and exits if not. Install is not 64bit capable. If getOsType <> "x86" Then Msgbox "The detected processor architecture is: " & getOsType & VbCrLf & VbCrLf & "The WinIDS install only supports 32bit architecture at this time!",vbokonly,"Detecting Processor Architecture..." WScript.Quit ElseIf getVersionNumber <> "5.1" and getVersionNumber <> "5.2" and getVersionNumber <> "6.1" Then Msgbox "The OS Product Name is " & getProductName & ", and is not supported!" & VbCrLf & VbCrLf & "Supported Product Names: XP SP3, Server 2003 SP2, and Windows 7",vbokonly,"Detecting Product Name..." WScript.Quit End If QueryForUser(accUserName) 'This creates the new username if it doesn't exist Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName Set objComputer = GetObject("WinNT://" &strComputer) Set colAccounts = GetObject("WinNT://" & strComputer & "") Set objUser = colAccounts.Create("user", accUserName) objUser.SetPassword accUserPass objUser.Put "UserFlags", 65600 ' objUser.SetInfo 'This adds user to Administrators group Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group") Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ",user") objGroup.Add(objUser.ADsPath) 'This changes the password if the user exists Sub QueryForUser(strUserName) Set objlocal = GetObject("WinNT://.") objlocal.Filter = Array("user") For Each User In objlocal If lcase(User.Name) = lcase(strUserName) Then strComputer = "." Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ", user") objUser.SetPassword accUserPass objUser.SetInfo 'This checks to see if the user needs added to the Administrators Group Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators") For Each objUser in objGroup.Members If objUser.Name = accUserName Then Else Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group") Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ",user") objGroup.Add(objUser.ADsPath) End If Next End If Next End Sub When the scripts gets to the end the user has to be Operator in order for the registry settings to be set. I didn't incorporate the changes you mentioned so you could see the original script. There are other parts to the script but this part needs to work and the other parts will fall right in. TIA... PS I might mot be able to get right back becuse we are under a hurricane watch and might have no power. -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
What is happening is that if the user is logged in as user x and and runs the script, it's creating the User Operator, and the script is setting those two registry settings for user x and not Operator. The UAC registry setting is being set because it's HKLM whereas the other two are using HKCU. The solution is to set an Administrators group policy for those two items. Possibly, I was thinking, the script could create the user account and reboot telling the user to log back on with the new Operator credentials and run the script again. I would need to figure out how to bypass the routine that creates the user account, seeing it's already done this. The three things that needs checked ar; Username, Password, and Administrator access. If all three of those are met then it could bypass the routine that creates the user account. This is a really ugly way to do it. -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
On Error Resume Next Dim objWShell Set objWShell = WScript.CreateObject("WScript.Shell") getVersionNumber = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion") getOsType = objWShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") getProductName = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") ComputerName = "WinIDS" If getOsType = "x86" Then Select Case getVersionNumber Case "6.1": Executes this code if it's 6.1, and proceeds to the Continue On... Case "5.2" Or "5.1": Executes this code if it's 5.1 or 5.2, and proceeds to the Continue On... Case Else: Ececutes this code if it's not 6.1, 5.1, or 5.2 End Select Else Executes this code if it's Not x86 End If Continue On... I Was thinking that placing the checks first dumping the user out of the script, which the above is basically doing but inserting the executable code in the middle of the checks. If getOsType <> "x86" Then Msgbox "The detected processor architecture is: " & getOsType & VbCrLf & VbCrLf & "The WinIDS install only supports 32bit architecture at this time!",vbokonly,"Detecting Processor Architecture..." WScript.Quit ElseIf getVersionNumber <> "5.1" and getVersionNumber <> "5.2" and getVersionNumber <> "6.1" Then Msgbox "The OS Product Name is " & getProductName & ", and is not supported!" & VbCrLf & VbCrLf & "Supported Product Names: XP SP3, Server 2003 SP2, and Windows 7",vbokonly,"Detecting Product Name..." WScript.Quit End If It just looks like there should be a better way then my example. I have another problem that requires setting policies for the Administrators group. Do you know how to do this from the script? objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD" -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
I'm having a small problem with this sub routine: The getVersionNumber is having a problem. If the getVersionNumber equals either 5.1, 5.2, 0r 6.1 then it's supposed to jump over and continue. However it executes the next line and quits. getOsType = "x86" getVersionNumber = "6.1" If getOsType <> "x86" Then Msgbox "The detected processor architecture is: " & getOsType & VbCrLf & VbCrLf & "The WinIDS install only supports 32bit architecture at this time!",vbokonly,"Detecting Processor Architecture..." WScript.Quit ElseIf getVersionNumber <> "5.1" or getVersionNumber <> "5.2" or getVersionNumber <> "6.1" Then Msgbox "The OS Product Name is " & getProductName & ", and is not supported!" & VbCrLf & VbCrLf & "Supported Product Names: XP SP3, Server 2003 SP2, and Windows 7",vbokonly,"Detecting Product Name..." WScript.Quit End If Solved: If getOsType <> "x86" Then Msgbox "The detected processor architecture is: " & getOsType & VbCrLf & VbCrLf & "The WinIDS install only supports 32bit architecture at this time!",vbokonly,"Detecting Processor Architecture..." WScript.Quit ElseIf getVersionNumber <> "5.1" and getVersionNumber <> "5.2" and getVersionNumber <> "6.1" Then Msgbox "The OS Product Name is " & getProductName & ", and is not supported!" & VbCrLf & VbCrLf & "Supported Product Names: XP SP3, Server 2003 SP2, and Windows 7",vbokonly,"Detecting Product Name..." WScript.Quit End If Unless there is a better way to do this? -
I hacked on the script a little. The first section adds the user to the Administrators group if the user doesn't exist. If the user exists it jumps to the next section, adds a password but doesn't check to see if they belong to the Administrators group, and if they don't it should add them. I'm not reak sure how to add this routine in? Did you find out why it taks so long to run? accUserName = "Operator" accUserPass = "p@ss" QueryForUser(accUserName) 'this section creates the new username if it doesn't exist Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName Set objComputer = GetObject("WinNT://" &strComputer) Set colAccounts = GetObject("WinNT://" & strComputer & "") Set objUser = colAccounts.Create("user", accUserName) objUser.SetPassword accUserPass objUser.Put "UserFlags", 65600 ' objUser.SetInfo 'add user to administrators group Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group") Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ",user") objGroup.Add(objUser.ADsPath) msgbox "username was created" 'this section just changes the password if the user exists Sub QueryForUser(strUserName) Set objlocal = GetObject("WinNT://.") objlocal.Filter = Array("user") For Each User In objlocal If lcase(User.Name) = lcase(strUserName) Then strComputer = "." Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ", user") objUser.SetPassword accUserPass objUser.SetInfo msgbox User.Name & " already exists." & vbCrLf & "The password was re-set." WScript.Quit End If Next End Sub TIA..
-
My script has a problem: First section: Scans the users and adds a user if they don't exist Sets the password, sets the password to not expire, and assigns the user to the Administrators group. Second section: If the user already exists it assigns a new password, and sets the password to not expire. The problem is if the user exists it jumps to the second section. It doesn't check to see if the user belongs to the Administrators group. I can move the code from the first section that adds the user to the Administrators group and it works fine if the user does not already belong to that group. If the user already belongs to the Administrators group it throws an error. What I'm looking for is help putting that routine in section two that checks if the user already belongs to the Administrators group and jumps over that routine. Possibly someone might have a better idea. I have absolutely no training using Visual Basic. I can usually hack something together. accUserName = "Operator" accUserPass = "p@ss" QueryForUser(accUserName) 'this section creates the new username if it doesn't exist Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName Set objComputer = GetObject("WinNT://" &strComputer) Set colAccounts = GetObject("WinNT://" & strComputer & "") Set objUser = colAccounts.Create("user", accUserName) objUser.SetPassword accUserPass objUser.Put "UserFlags", 65600 ' objUser.SetInfo 'add user to administrators group Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group") Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ",user") objGroup.Add(objUser.ADsPath) msgbox "username was created" 'this section just changes the password if the user exists Sub QueryForUser(strUserName) Set objlocal = GetObject("WinNT://.") objlocal.Filter = Array("user") For Each User In objlocal If lcase(User.Name) = lcase(strUserName) Then strComputer = "." Set objUser = GetObject("WinNT://" & strComputer & "/" & accUserName & ", user") objUser.SetPassword accUserPass objUser.SetInfo msgbox User.Name & " already exists." & vbCrLf & "The password was re-set." WScript.Quit End If Next End Sub TIA...
-
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
Here is the script that I have completed, so far. I still need to add the user name change. Could someone check it out and make any changes that it might need and see if it flows from one task to the other. On Error Resume Next Dim objWShell Set objWShell = WScript.CreateObject("WScript.Shell") getVersionNumber = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion") getOsType = objWShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") getProductName = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") ComputerName = "WinIDS" 'Tests for x86 processor architecture and eXits if not. If getOsType = "x86" Then 'Tests for Windows Windows 7 (6.1) and continues if not. If getVersionNumber = "6.1" Then 'Sets registry to disable ELUA, Show Hidden files and folders, and display file extensions. objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA", "0", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD" 'Changes the computer name. Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colComputers = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") objComputer = "." For Each objComputer In colComputers err = objComputer.Rename(ComputerName) Next If err <> 0 Then Msgbox "There was an error renaming the machine. Please restart, and try again." Else Set objWMIService = Nothing Set colComputera = Nothing 'Tests for Windows XP (5.1) or Windows Server 2003 (5.2) and eXits script if not. ElseIf getVersionNumber = "5.2" Or "5.1" Then 'Sets registry to Show Hidden files and folders, and display file extensions. objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD" 'Changes the computer name. objWShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName", computerName objWShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\ParameterS\NV Hostname", computerName Else Msgbox "The OS Product Name is " & getProductName & ", and is not supported!" & VbCrLf & VbCrLf & "Supported Product Names: XP SP3, Server 2003 SP2, and Windows 7",vbokonly,"Detecting Product Name..." WScript.Quit End If Else Msgbox "The detected processor architecture is: " & getOsType & VbCrLf & VbCrLf & "The WinIDS install only supports 32bit architecture at this time!",vbokonly,"Detecting Processor Architecture..." WScript.Quit End If 'Tests for username and creates or alters user account based on exists or does not exist. 'To be completed 'This finally does a shutdown to apply changes made. objWShell.Run "shutdown /r /t 10 /f /d P:4:2" 'Restarts OS in 10 seconds to apply changes. Set objWShell = Nothing -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
There is another section of script that goes above this one that is completed. It does all the checking and when it gets to this part of the script it has to be either 6.1, 5.2, or 5.1 The script above works it just needs the sections removed and cleaned up by someone that has theses skills. It wopuld be a lot of trial and error for the inexperianced. -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
Ok, I started on the next section, and need a little help in getting it cleaned up and changed a little. I'm not at all sure how to edit this correctly, so any help would be great. This section changes the computer name. 1) Can the error checking be removed? 2) Can the "Machine successfully renamed..." be removed? 3) Can the "The OS is not 7, Vista, XP, or 2K3..." be removed? All I need it to do is just bounce through the code with no display. If it's 6.1 then execute that part and continue to the next section of the script to change the user name. If it's not 6.1 then jump to the section for 5.2 or 5.1, and execute with no checking, because at this point it has to be 5.2 or 5.1, and then jump to the section to change the user name. 'This section changes the computer name. ComputerName = "WinIDS" If getVersionNumber = "6.1" Then Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colComputers = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") objComputer = "." For Each objComputer In colComputers err = objComputer.Rename(ComputerName) Next If err <> 0 Then Msgbox "There was an error renaming the machine. Please restart, and try again." Else Msgbox "Machine successfully renamed to " & computerName End If Set objWMIService = Nothing Set colComputera = Nothing ElseIf getVersionNumber = "5.2" or "5.1" Then objWShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName", computerName objWShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\ParameterS\NV Hostname", computerName Else Msgbox "The OS is not 7, Vista, XP, or 2K3. The OS Version number is: " & getVersionNumber End If Else End If 'This section will add or changes the user name 'To be continued... TIA -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
This is what I've tested with Windows 7, XP and Server 2003. Processor architecture detection has also been tested. On Error Resume Next Dim objWShell Set objWShell = WScript.CreateObject("WScript.Shell") getVersionNumber = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion") getOsType = objWShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") getProductName = objWShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") If getOsType = "x86" Then 'Tests for x86 processor architecture and eXits if not. If getVersionNumber = "6.1" Then 'Tests for Windows Windows 7 install and continues if not. objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA", "0", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD" ElseIf getVersionNumber = "5.2" Or "5.1" Then 'Tests for Windows XP or Windows Server 2003 and eXits if not. WshShell.Popup "How Do You Feel?", 5, "Good Morning:", 0 + 48 objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD" objWShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD" Else Msgbox "The OS Product Name is " & getProductName & ", and is not supported!" & VbCrLf & VbCrLf & "Supported Product Names: XP SP3, Server 2003 SP2, and Windows 7",vbokonly,"Detecting Product Name..." WScript.Quit End If Else Msgbox "The detected processor architecture is: " & getOsType & VbCrLf & VbCrLf & "The WinIDS install only supports 32bit architecture at this time!",vbokonly,"Detecting Processor Architecture..." WScript.Quit End If ' To do: Change Computer name - Complete - XP, Server 2003, and Windows 7 ' Add User Account Plus - XP, Server 2003, and Windows 7 objWShell.Run "shutdown /r /t 10 /f /d P:4:2" 'Restarts OS in 10 seconds to apply changes. Set objWShell = Nothing -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
Well, it looks like the thread went dead. Does anyone know of a reputable site where I can hire a programmer, or possibly know know of a programmer for Visual Basic that might want to do this? -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
Yes, 64bit will be supported but the main engine is only 32bit at this time, and a 64bit version is coming but has yet to be started on. If I don't change the computer name before the install, then I have to guide them through setting 'winids' in the hosts file. Disabeling UAC will allow them to use the CMD in Administartor mode, and bypasses a lot of prompts. -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
The guides are designed for a stand alone system. This will be given away and included in the free software support pack. This will ensure that everyone installing one of the free guides will be on the same page prior to starting the install. There is no kits for sale on my site, and any systems sold are custom built to the customer specifications. Everything can be in a single script. Start the VBS it should allow the user to preform one of the tasks or all the tasks. The menu should have a quit, so if they choose to preform one task it will bounce back to the main menu. This doesn't have to be fancy in any way. I may need to add/remove/edit items to the script in the future so the script needs to be editable. TIA... -
Need help in sorting these scripts out and possible better solutions.
mesteele101 replied to mesteele101's topic in Scripts
I have no idea, but I'm able to test on all.
