Jump to content

makaveli07

Member
  • Posts

    8
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About makaveli07

makaveli07's Achievements

0

Reputation

  1. Thanks for all your help... This code is helps big time.. Thanks again gunsmokingman
  2. i want to be able to have inputbox, so the user can put a number value from 1 -7 and that value with get inserted right after the word extremeserver. After they input the value it will save the file with the changes.. Does that help?
  3. Hey guys, Does anyone have a script that can skip like a random number of lines, then write a value from the inputbox command to a specific word... I just want to be able to put like a 1 - 7 from an inputbox after the extremeserver part. Ex: 'Skip the line below SLGOrchardSite.properties - Properties file for the SLGOrchardSite database 'skip the line below driver = com.mysql.jdbc.Driver 'Change the extremeserver part of this line dbConnection = jdbc:mysql://extremeserver:3306/ 'Skip the line below database = ClusterDB Thanks if anyone can help
  4. I am using your code and i added a network printer & join a domain option also but i keep gettin errors... maybe i am not using the Function command correctly... can you help me buddy.. Below i have my code that i used to create vbs script to do those command, but i want to but those into your .hta file Add Network Printer Code ----------------------------------------- Set WshNetwork = CreateObject("WScript.Network") strFullPath = Inputbox("Please enter the full path of your network printer here:" _ "Example:\\extremeserver01\delllase","Enter Printer Path") strPrintSrvrPath = "\\<servername>\" strPrinterName = Inputbox("Please enter the name of your network printer here:" _ "Example:delllase","Enter Printer Name") If strFullPath = "" Then strFullPath = strPrintSrvrPath & strPrinterName End If WshNetwork.AddWindowsPrinterConnection strFullPath Msgbox "Printer " & strFullPath & " Installed" Join A Domain Code ----------------------------------------- Name = InputBox("Enter the new computer name below and click OK to Continue Example:laptop1","Rename: Step 1") Password = "i8bobokh" Username = "aayobi" Set objWMIService = GetObject("Winmgmts:root\cimv2") ' Call always gets only one Win32_ComputerSystem object. For Each objComputer in _ objWMIService.InstancesOf("Win32_ComputerSystem") Return = objComputer.rename(Name,Password,User) If Return <> 0 Then WScript.Echo "Rename failed. Error = " & Err.Number Else WScript.Echo "Rename succeeded." & " Reboot for new name to go into effect" End If Next DomainName = InputBox("Enter the Domain to join this computer to and click OK to continue","Rename: Step 1") DomainPassword = "i8bobokh" DomainUsername = "aayobi" Set objWMIService = GetObject("Winmgmts:root\cimv2") ' Call always gets only one Win32_ComputerSystem object. For Each objComputer in _ objWMIService.InstancesOf("Win32_ComputerSystem") Return = objComputer.JoinDomainOrWorkgroup(DomainName,DomainPassword,DomainUsername) If Return <> 0 Then WScript.Echo "Rename failed. Error = " & Err.Number Else WScript.Echo "Rename succeeded." & " Reboot for new name to go into effect" End If Next ------------------------------------------------- Thanks again
  5. Nice program man... very nice ... what if i want to change some of the code.. what do i need to save the file as?
  6. Hello all, I was wondering if someone could help me with this script. I need to allow a inputbox function to allow the user to change the name of the My computer icon. I have this code below, which changes the name of the My Computer icon to the system name... I want to let the user change it... i am going to be using it for Imaging. Thanks in Advance... ------------------------------------------------------------------------ Name=InputBox("Enter the computer name you want") const MY_COMPUTER = &h11& Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(MY_COMPUTER) Set objFolderItem = objFolder.Self objFolderItem.Name = strComputer
×
×
  • Create New...