Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Multipurpose Batch File  (Read 3583 times)

0 Members and 1 Guest are viewing this topic.

Kelers

  • Guest
Multipurpose Batch File
« on: June 28, 2007, 07:41:03 AM »
Can you help I want to create a bat file that will do the following

Copy a folder from a CD to the hard drive
Then create a shortcut for an excel file within that folder to be sent to desktop
And finally install an excel viewer also in that same file

I'm unsure of the command to create a shortcut I know how to move it once this is done, judst unsure how to create it.

And with the excel viewer is it possible to make the bat file bypass all the yes, no & next buttons in the installation process?

ilikemycomputer



    Rookie

  • http://halescomputerservice.com/phpBB/index.php
    Re: Multipurpose Batch File
    « Reply #1 on: July 03, 2007, 09:21:12 AM »
    I don't know if there is a command to create a shortcut ???

    contrex

    • Guest
    Re: Multipurpose Batch File
    « Reply #2 on: July 03, 2007, 10:25:01 AM »
    Quote
    Copy a folder from a CD to the hard drive

    You don't need me to tell you how to do that, do you?  ::)

    Quote
    I'm unsure of the command to create a shortcut

    The SHORTCUT command is in the Microsoft Windows NT Resource Kit available here

    http://www.dynawell.com/support/ResKit/winnt.asp

    example

    shortcut -t "c:\test\File To Link To.exe" -n "c:\test\Shortcut Name"

    Type shortcut /? for full syntax

    Quote
    And with the excel viewer is it possible to make the bat file bypass all the yes, no & next buttons in the installation process?

    msiexec /i XLVIEW.MSI /qn ACCEPTEULA=1 ASSOCIATE=1

    http://www.msfn.org/board/index.php?showtopic=53671&mode=linearplus




    « Last Edit: July 03, 2007, 11:48:53 AM by contrex »

    ghostdog74



      Specialist

      Thanked: 27
      Re: Multipurpose Batch File
      « Reply #3 on: July 03, 2007, 07:12:28 PM »
      here's a vbscript to create shortcut. amend to your needs
      Code: [Select]
      Set Shell = CreateObject("WScript.Shell")
      DesktopPath = Shell.SpecialFolders("Desktop")
      Set link = Shell.CreateShortcut(DesktopPath & "\test.lnk")
      link.Arguments = "1 2 3"
      link.Description = "test shortcut"
      link.HotKey = "CTRL+ALT+SHIFT+X"
      link.IconLocation = "app.exe,1"
      link.TargetPath = "c:\blah\app.exe"
      link.WindowStyle = 3
      link.WorkingDirectory = "c:\blah"
      link.Save