maniaq Posted June 11, 2005 Posted June 11, 2005 can teach me how to put the shortcut, for egzample nero burning rom.lnk on the desktop while the desktop isn't started,maybe it can be done with runonceex.tnx
Doc Symbiosis Posted June 11, 2005 Posted June 11, 2005 You could use a vbs-script, perhaps the following:-----------------------------------------------------------------------------------'This Script creates a shortcut to the second argument in location of the first argument(including the shortcut's name) 'The shortcut is set to start with maximized window, the icon is taken from the targetfileSet WSHShell = WScript.CreateObject("WScript.Shell") Set fs = WScript.CreateObject("Scripting.FileSystemObject") set oArgs = Wscript.Arguments SCutPath = oArgs.item(0) 'The first argumentProgPath = oArgs.item(1) 'The second argument SCutPath = wshshell.ExpandEnvironmentStrings(SCutPath) 'Expand environment variables to real pathProgPath = wshshell.ExpandEnvironmentStrings(ProgPath) 'Expand environment variables to real pathSet scut = WSHShell.CreateShortcut(ScutPath &".lnk")scut.TargetPath = fs.GetAbsolutePathName(ProgPath)scut.WorkingDirectory = fs.GetParentFolderName(ProgPath)scut.IconLocation = ProgPath &",0"scut.Windowstyle = 3scut.Save------------------------------------------------------------------------------------------you can call it from runonceex.cmd with the shortcutpath and progrmlocation as parameters, in which they are expanded, means that you can use environment variables like %PROGRAMFILES%, %ALLUSERSPROFILE% or %USERPROFILE% in your parameters.When you save it as $OEM$\$1\Install\cscut.vbs, you can call it from runoceex.cmd likeREG ADD %KEY%\005 /VE /D "Create Shortcut" /fREG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\cscut.vbs %ALLUSERSPROFILE%\Desktop %PROGRAMFILES%\Nero\Nero.exe" /f
DigeratiPrime Posted June 11, 2005 Posted June 11, 2005 (edited) You could just create the shortcuts in advance and place them in the $OEM$ folders and they'll be copied automatically. For example:\XPCD\$OEM$\$Docs\All Users\Desktop\XPCD\$OEM$\$Docs\All Users\Start Menu\ProgramsYou can also use the %ProgramFiles% or other Environment Variables in the shortcuts. Edited June 11, 2005 by DigeratiPrime
matthewk Posted June 11, 2005 Posted June 11, 2005 (edited) This might help: http://64.233.187.104/search?q=cache:xy8Yl...owtopic%3D32125Edit: Also, http://www.robvanderwoude.com/amb_shortcuts.html was a good read. Edited June 11, 2005 by matthewk
Yzöwl Posted June 11, 2005 Posted June 11, 2005 I have given examples here of how to do this using inf files and many people here also use a small utility tool named shortcut.exe.
maniaq Posted June 12, 2005 Author Posted June 12, 2005 (edited) I have read the notes and it seems a little to hard for me to understand, but @DigeratiPrime has given me the easyiest way(i think) to create shortcut, just copy the .lnk file to the \XPCD\$OEM$\$Docs\Administrator\DesktopI only need to modify the target of the link fromE:\Program Files\Ahead\Nero\nero.exeto%ProgramFiles%\Ahead\Nero\nero.exethis should work, right? Edited June 12, 2005 by maniaq
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