Celestial Fury Posted September 21, 2004 Share Posted September 21, 2004 Hi.I have a few programs (plugins actually) that do not have an install routine - they are just copied to a program file directory and a shortcut placed on the desktop - the shortcut then opens the plugin, which opens the main program.What I want to know is how do I do this in an unattended install?Fury Link to comment Share on other sites More sharing options...
prathapml Posted September 21, 2004 Share Posted September 21, 2004 Just directly put the shortcuts to where you want them - if you want them on desktop then $OEM$\$Docs\All Users\DesktopIf you want in start menu, then$OEM$\$Docs\All Users\Start Menu\Programs\ Link to comment Share on other sites More sharing options...
Celestial Fury Posted September 21, 2004 Author Share Posted September 21, 2004 cheers m8 - tyFury Link to comment Share on other sites More sharing options...
jdoe Posted September 21, 2004 Share Posted September 21, 2004 If your unattended install if for you only and for the same drive then put shortcuts in these folders$OEM$\$Docs\All Users\Desktop$OEM$\$Docs\All Users\Start Menu\Programs\BUT if you need your installation to work on many computers or drive you should use a program like SHORTCUT.EXE for creating shortcuts because in a LNK file (*.lnk) there is informations about computer name and drive so to do it clean you should use SHORTCUT.EXESHORTCUT.EXE Link to comment Share on other sites More sharing options...
prathapml Posted September 21, 2004 Share Posted September 21, 2004 jdoe is right.If your CD is going to be used where the shortcut-ed apps won't stay in C:\ drive (maybe you want to install on D: drive), then you should use variables in the .LNK path.For example, change the "target" for ZoneAlarm from "C:\Program Files\Zone Labs\ZoneAlarm\zlclient.exe"to this:"%ProgramFiles%\Zone Labs\ZoneAlarm\zlclient.exe" That way, it is "portable" across different setups of windows.I prefer to use as few third-party apps as possible, so I don't use the (OptimumX) shortcut, and do setting up manually. Link to comment Share on other sites More sharing options...
jdoe Posted September 21, 2004 Share Posted September 21, 2004 @prathapml is right but it won't remove computer name in the *.LNKOn a network a shortcut from an other computer could try to start the program from the remote computer and not the local.In your case I don't think this is important but there is few things to know about shortcuts because strange behavior could happen.For installing your programs there is always VBScript with which you can install and create shortcuts (no need of shortcut.exe) Link to comment Share on other sites More sharing options...
tguy Posted September 24, 2004 Share Posted September 24, 2004 Here is a sample of a vbScript I use during my unattended builds. This one will create a shortcut on the desktop and on the Quick Launch toolbar for Windows Explorer.'Create Windows Explorer Desktop iconSet Shell = CreateObject("WScript.Shell")DesktopPath = Shell.SpecialFolders("AllUsersDesktop")Set link = Shell.CreateShortcut(DesktopPath & "\Explorer.lnk")link.Arguments = "/n,/e,c:\"link.Description = "Explorer link"link.HotKey = "CTRL+ALT+SHIFT+E"link.IconLocation = "%SystemRoot%\explorer.exe"link.TargetPath = "%SystemRoot%\explorer.exe"link.WindowStyle = 1link.WorkingDirectory = "%HOMEDRIVE%%HOMEPATH%"link.Save'Create Windows Explorer Quick Launch iconConst OverwriteExisting = TrueSet objFSO = CreateObject("Scripting.FileSystemObject")If objFSO.FolderExists("C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\") Then objFSO.CopyFile "C:\Documents and Settings\All Users\Desktop\Explorer.lnk" , "C:\Documents and Settings\Default User\Application Data\Microsoft\Internet Explorer\Quick Launch\", OverwriteExistingElse Set objFolder = objFSO.CreateFolder("C:\Documents and Settings\Default User\Application Data\Microsoft\Internet Explorer\Quick Launch\") objFSO.CopyFile "C:\Documents and Settings\All Users\Desktop\Explorer.lnk" , "C:\Documents and Settings\Default User\Application Data\Microsoft\Internet Explorer\Quick Launch\", OverwriteExistingEnd IfIf objFSO.FolderExists("C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\") Then objFSO.CopyFile "C:\Documents and Settings\All Users\Desktop\Explorer.lnk" , "C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\", OverwriteExistingElse Set objFolder = objFSO.CreateFolder("C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\") objFSO.CopyFile "C:\Documents and Settings\All Users\Desktop\Explorer.lnk" , "C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\", OverwriteExistingEnd IfobjFSO.CopyFile "C:\Documents and Settings\All Users\Desktop\Explorer.lnk" , "C:\Documents and Settings\Default User\Application Data\Microsoft\Internet Explorer\Quick Launch\", OverwriteExistingHope this helps.tguy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now