Skip to content

scripting

need to script something ? do it here

  1. Started by jamitupya,

    Im trying to output the content from from a tracert command to excel however i am unsure how i can output this in an excel cell.... any ideas? Set WshShell = WScript.CreateObject("WScript.Shell") Ping = WshShell.Run("ping -n 2 -a " & HostName, 0, True) tracert = WshShell.Run("tracert -4 " & HostName, 0, True) objExcel.Cells(intRow, 1).Value = UCase(HostName) Select Case Ping Case 0 objExcel.Cells(intRow, 2).Value = "OK" Case 1 objExcel.Cells(intRow, 2).Value = "NG" End Select Select Case tracert Case 0 objExcel.Cells(intRow, 3).Value = "OK" Case 1 objExcel.Cells(intRow, 3).Value = "NG" End Select Basically PING is OK and NG and works per…

    • 0 replies
    • 5.2k views
  2. Hi Guys, I would like to add domain users to be able to log on via RDP to their desktop via script or GPO. Basically, all our desktops are named after the user who uses it. Dersktop=sjobs-xp1, sjobs-ws1 and Username=sjobs Can you guys advise me how can I achieve this? Any scripting ideas on windows? We also just started using SCCM, so anything there can also work.

  3. Hey Everyone, I've got a batch file that I'm trying to get to work and seem to be running into difficulties on getting the whole batch file to work. I'm guessing that I have something missing or incorrect. What I'm trying to accomplish is we currently have Java versions 7.0.45 both x64 & x86 platforms installs on all production client machines. My batch file will uninstall the x86 version of Java 7.0.45 and then install the latest version of Java 7.0.51 x86 without any problems. It's the x64 that my batch file is running into problems and does not uninstall it or install the new version of java (7.0.51 x64). Here's what my batch file looks like: @ECHO …

      • Like
    • 1 reply
    • 7.2k views
  4. Started by J03,

    Hi All, Can someone help me with a script (Powershell or VB) to populate the currently logged in username from Computers ? What I have ? A spreadsheet with Computer names. Eg: COMP001 COMP002 . . . COMP00n What I am looking for ? A script that reads Computer names from the spreadsheet and finds the currently logged in users on these computer and export the details to another spreadsheet in a something similar format. COMP001 Adam COMP002 Brian I tried some scripts which I got from different forums out there but I am not getting what I am trying to achieve. Thanks, Joe

  5. Hi, my intention is to copy 2 files into a folder, where only the admin own full permissions. Normal user have only read permissions. The destination directory is: C:\Program Files\Java\jdk1.8.0_45\jre\lib\security The new two files are: jocal_policy.jar and us_export_policy.jar i have to overwrite two files in destination folder, because they are to old. (or first, i delete the old two files and then copy the new two files) Here is my Batchfile, but i dont understand why nothing changes, if i send the batch file to a client: del "C:\Program Files\Java\jdk1.8.0_45\jre\lib\security\*.jar" copy %~dp0local_policy.jar "C:\Program Files\Java\jdk1.8.0_45\jr…

    • 0 replies
    • 3.6k views
  6. Started by Quinten,

    I have a string CIM_Chassis (CreationClassName = "CIM_DockingStation", Tag = "ABCD1234") How do I get just the ABCD1234 ? I have 2 equal signs and 2 sets of quotes and that is messing me up. Any help would be great.

    • 1 reply
    • 2.8k views
  7. Started by Settat,

    I am trying to create a simple PowerShell script to protect a specific Task Sequence with a password. Any help is going to be appreciated. SCCM 2207. Thank you!

  8. Started by jamitupya,

    This script will load a command line variable for the username or can auto to administrator and password from an ini file. ' Initialization Set wshNetwork = CreateObject("WScript.Network") Set shell = CreateObject("WScript.Shell") Set fs = CreateObject("Scripting.FileSystemObject") ' Get parameters Program = "AutoLog.vbs" If WScript.Arguments.Count > 0 then username = WScript.Arguments.Item(0) Else username = TranslateLocalUser("Administrator") End if If WScript.Arguments.Count > 1 then password = WScript.Arguments.Item(1) Else password = ReadIni("C:\Build\Settings.ini", "LocalAdmin", "localAdminPassword") End if computerName = wshNetwork.Com…

    • 0 replies
    • 10.4k views
  9. Started by Kingskawn,

    In a command-prompt windows just type: "WMIC ComputerSystem GET Model" I had to use this several times to know exactly which computer model I had

    • 0 replies
    • 3.6k views
  10. Started by Kingskawn,

    I need a vbs script to check which language my OS is and install the adequate application. I had for example the update of RDP 6.1 for SP2 that I needed to deploy but I had some 1603 errors and I couldn't figure out what was causing this. Seems that it was just the language of the OS that was not matching. So I have a WindowsXP-KB952155-x86-ENU and WindowsXP-KB952155-x86-NLD

  11. Hi All, Can any "Scripting-Rockstar" here help me out ??? I need a VBSscript which can perform "Disk Cleanup" action without any user interaction on user machines. I will later wrap it using WISE Re-packaging tool and then deploy it thorugh SCCM 2007. Its really urgent...!!!!! Please help out.

  12. Started by Unique01,

    Hi, Due to some lost machines on our network, i came up with an ideia...possibly a stupid (or not the best) one My idea was to create a script to run everyday through scheduled task on the client computer. The basic function of the script would be to ping a domain controller to check the presence of the computer on our offices... If the computer cannot ping a domain controller for 4 months (let's say a smart guy took a laptop to "work" at home), it would run an action, (lock computer, delete something, put it in loop, something) to force the user to bring back the computer to out IT team. Any ideas where i should start? Any different approaches? Any suggestion wi…

    • 0 replies
    • 2.6k views
  13. Started by jamitupya,

    Hi Guys, I got some code that i need to extend to include detection of vista windows 7 2008 etc and was wondering if anyone could give me some assistance. basically i need to add detection of windows vista and 7 and possibly w2k8+ ....any ideas...have nfi btw... looking at snippets atm trying to solve.... '========================================================================== 'Determine OS using WMI '========================================================================== Dim sWXPP, sW2KP, sW2KS, sW2KAS, sW2KDS, sW2K3S, sW2K3W, sW2K3E, sUnkOS, sWbemOpSys Dim oWbemServices Dim cOperatingSystems Dim oInstance sWXPP = "Microsoft Windows XP Professional" sW…

    • 2 replies
    • 14.7k views
  14. Started by wmmayms,

    When you run scheduled jobs in MS SQL you sometimes want to output the results to a txt file. This works like a charm... However MS tends to add four annoying rows to the top of this output file. I thought it was easy to remove these rows with a simple vbs/batch command....but No!! Since it´s unicode format it gets a bit harder... here is the code i ended up using: 'Written by wmmayms 13/12 - 2010 Option Explicit strTextFile = "<----ADD PATH TO YOUR TXT FILE HERE---->" Dim objFSO, objFile , strTextFile, strData, strLine, arrLines, i CONST ForReading = 1 CONST ForWriting = 2 'Create a File System Object Set objFSO = CreateObject("Scriptin…

    • 0 replies
    • 3.4k views
  15. Started by salle,

    First, sorry if this is in incorrect forums. I'm trying to get HP EliteBook Product Number from WMI with VbScript, but I can't find it anywhere! It used to be (in older models) like this: HP Compaq nw8440 (ES592EA#AK8), but newer models only give this: HP EliteBook 8530p. The info was taken from Win32_ComputerSystem / Model. Where could this model number info be now?

    • 2 replies
    • 11.6k views

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.