Windows Scripting

Discussion in 'Software Q&A' started by kinshuksunil, Dec 21, 2004.

Thread Status:
Not open for further replies.
  1. kinshuksunil

    kinshuksunil New Member

    Joined:
    Dec 4, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    New Delhi, India
    Hi All

    Anyone has some idea about Windows Scripting...

    What it is, how we do it, and all that stuff...

    Kinshuk
     
  2. sms_solver

    sms_solver New Member

    Joined:
    Jan 2, 2004
    Messages:
    420
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    somewhere
    If you know Visual Basic language or VBScript then you'll be able to script Windows

    You will need example to learn, there are some example that comes with Windows itself, just search for files with *.vbs or something like that
     
  3. OP
    OP
    kinshuksunil

    kinshuksunil New Member

    Joined:
    Dec 4, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    New Delhi, India
    More than VBScripting

    Hi

    I have been programming in VB for the past 2-3 years and so can boast of some basic vb programming skills, never tried vbs though. there is not much difference between the two either.

    But i believe, windows Scripting is more than VB Scripting. I dont know how correct i am?

    Kinshuk
     
  4. Ashis

    Ashis New Member

    Joined:
    Aug 14, 2004
    Messages:
    343
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Bhubaneswar
    Re: More than VBScripting

    Programming VB Script For Last 2-3 years! :shock:
    Good, then post Some Script to ShutDown, ReBoot & LogOff Windows XP;
    The normal Way & the Force methord! :idea:

    If U can Thanks! :D
     
  5. sms_solver

    sms_solver New Member

    Joined:
    Jan 2, 2004
    Messages:
    420
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    somewhere
    Install X-setup Pro, it has over 1700 windows customizing tips, and the best part is that it comes will all the scripts. So u can learn see the script that comes with X-setup! :)

    http://www.x-setup.net/
     
  6. OP
    OP
    kinshuksunil

    kinshuksunil New Member

    Joined:
    Dec 4, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    New Delhi, India
    Reply!!!

    Hi All

    I simply dont want to customise windows through a software, but try real scripting...

    Btw, whats so special in shutting dowm, rebooting and logging Off windows, any1 can do that with WinAP!...

    Kinshuk
     
  7. sms_solver

    sms_solver New Member

    Joined:
    Jan 2, 2004
    Messages:
    420
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    somewhere
    I have made one Window Script file:
    This script lets you ren one of either 4 programs
    Note: if AntiVirus sw are installed they might not allow the script to run
    Code:
    '* Copyright (c) sms_solver 
    '* Date:		4th-Jan-2004
    '********************************************************************
    ' Global declaration 
    
    OPTION EXPLICIT
    ON ERROR RESUME NEXT
    'Script starts from here
    Call Main
    
    Sub Main ()
    const msg1 = "This is Script which enables you to run any one of"
    const msg2 = "following 4 programs:"
    const msg3 = "1)Calculator  2)Notepad  3)Paint  4)MineSweeper"
        
    	WScript.Echo msg1 & vbcrlf & msg2 & vbcrlf & vbcrlf & msg3
    
    	Dim WSHShell
    	Set WSHShell = CreateObject("Wscript.Shell")
    	reply = WSHShell.Run(whProg,,true)
    End Sub
    
    Private Function whProg() 
    Dim choice, apName
    
    	choice = InputBox("Enter 1 or calc, 2 for notepad, 3 for Paint, 4 for MineSweeper","Give Your Choice")
    	Select Case choice
    		Case 1: apName="calc.exe"
    		Case 2: apName="notepad.exe"
    		Case 3: apName="mspaint.exe"
    		case 4: apName="winmine.exe"
    		Case Else: apName="calc.exe"
    	End Select
    	whProg = apName
    End Function
    
     
Thread Status:
Not open for further replies.

Share This Page