1.

Solve : Multipurpose Batch File?

Answer»

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?I don't know if there is a command to create a shortcut 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




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


Discussion

No Comment Found