Announcement

Collapse
No announcement yet.

More options

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • More options

    Rems got me really interested in writting scripts, and i must say its fun.
    Just playing around in a test environment got me creating this one:

    Code:
    Echo off
    ::This is the Test.local Logon Script
    ::Created By 'ME' 
    ::Date 22/02/2008
    Echo.---------------------------------------------------
    Echo.----------Logon Script-----------------------------
    Echo.---------------------------------------------------
    Echo.This Script maps all networkdrives and printers
    
    ::Maping user drive
    Set "Target=\\DC01\Home$\%username%"
    If Not Exist "%Target%",(
       MKDIR "%Target%"
        Cacls "%Target%" /E /R "Users"
         Cacls "%Target%" /E /R "Administrators"
          Net use U: "%Target%") Else (
         Net use U: "%Target%"
         )
        )
       )
    ::Maping Department drive
    Net use K: \\DC01\Department$\Engineering
    
    Echo.Drives are mapped, enjoy your stay.
    
    Echo.&Pause >Nul
    Now i have come to a point where i really wanna create a script that run multiple options like:

    If Exist () else (
    If Not exist
    IFOS and so on.

    now how do i go about creating options? ANd where do i place them in which case?
    [Powershell]
    Start-DayDream
    Set-Location Malibu Beach
    Get-Drink
    Lay-Back
    Start-Sleep
    ....
    Wake-Up!
    Resume-Service
    Write-Warning
    [/Powershell]

    BLOG: Therealshrimp.blogspot.com
Working...
X