Mad_Skillz Posted November 22, 2006 Share Posted November 22, 2006 could some one explain to me on how to create start menu folders, and shortcuts using a batch file for my unattended install? Link to comment Share on other sites More sharing options...
Ctrl-X Posted November 22, 2006 Share Posted November 22, 2006 Start menu folders are folders like any other and can be created using the "mkdir" (or "md") command. For instance: to create a "My Apps" folder in the All Users profile Programs folder, usemkdir "%ALLUSERSPROFILE%\Start Menu\Programs\My Apps"You can't create shortcuts directly from the command line or a batch file without using a third party program such as XXMKLINK. Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 22, 2006 Share Posted November 22, 2006 (edited) If you do not want to use any third party program. Then you can use a vbs script to make shortcuts. This script leaves a shortcut for notepad and WMP on the user desktop that ran this script. You could have this script start from cmd promt.Example StartShortCut.cmd@Echo OffCLSMode 65,7 Color F3Title Add ShortCuts Echo.Echo Preparing To Add Shortcuts To %UserName% Desktop:: Place The Path To The VBS File Here If It Is Not In The Same Directory As The StartShortCut.cmd:: start /w PATH_TO_THE_VBS_HERE\ShortCut.vbs:: This Is For If The VBS And StartShortCut.cmd Are In The Sam Directory start /w ShortCut.vbsstart /w ShortCut.vbsCLS Color 3FEcho.Echo Completed Adding The Shortcuts To %UserName% Desktopping -n 4 127.0.0.1>nulExitSave As ShortCut.vbsDim Act,colEnvironmentVariables, objShortCut, Shell Set Shell = CreateObject("WScript.Shell") Set colEnvironmentVariables = Shell.Environment("Volatile") Set Act = CreateObject("Wscript.Shell") Set objShortCut = Shell.CreateShortcut(Act.ExpandEnvironmentStrings("%UserProfile%\Desktop\Notepad.lnk")) objShortCut.TargetPath = "Notepad.exe" objShortCut.Description = "Open Notepad" objShortCut.HotKey = "Ctrl+Shift+N" objShortCut.Save Set objShortCut = Shell.CreateShortcut(Act.ExpandEnvironmentStrings("%UserProfile%\Desktop\Wmp.lnk")) objShortCut.TargetPath = Act.ExpandEnvironmentStrings("%ProgramFiles%\Windows Media Player\wmplayer.exe") objShortCut.Description = "Open Windows Media Player 11" objShortCut.HotKey = "Ctrl+Shift+M" objShortCut.Save Edited November 22, 2006 by gunsmokingman Link to comment Share on other sites More sharing options...
bledd Posted November 22, 2006 Share Posted November 22, 2006 the way i do it.. (not the best way, but hella easy i reckon..)you could use $OEM$ folders, to directly place each one, or just store them on $OEM$\install\shortcutsthen copy c:\install\shortcuts\* %userprofile%\start menu\programs\etc.. Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 22, 2006 Share Posted November 22, 2006 This is the way I do it myself, there no script or nothing needed it all get copy to the correct spot during the install. Path For ShortCut"%systemdrive%\Program Files\003RegTools\RegCleaner\RegCleanr.exe"Before InstallAfter Install Link to comment Share on other sites More sharing options...
Mad_Skillz Posted November 23, 2006 Author Share Posted November 23, 2006 thank you for your help 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