fatman01 Posted June 6, 2007 Share Posted June 6, 2007 Maybe I’m just a dummy but I can’t get a custom icon or shortcut to show up in the Administrator or all users desktop to install a program. I have read till my eyes are bloodshot. I’m not the sharpest color in the box, so please keep it simple. Any help would be deeply appreciated.Thanks in advance. Link to comment Share on other sites More sharing options...
ricktendo Posted June 6, 2007 Share Posted June 6, 2007 (edited) I need details to the path and name of the program executable, also the desired Shortcut name, and info tip...Example:Path: C:\Program Files\Program Folder\executable.exeShortcut Name: Install ThisInfo Tip: Install this on first boot Edited June 6, 2007 by ricktendo64 Link to comment Share on other sites More sharing options...
fatman01 Posted June 6, 2007 Author Share Posted June 6, 2007 Path: AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batShortcut Name: NOD32 InstallInfo Tip: Install this on first boot Link to comment Share on other sites More sharing options...
oneless Posted June 6, 2007 Share Posted June 6, 2007 Path: AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batShortcut Name: NOD32 InstallInfo Tip: Install this on first boothow i do it with WINRAR [you must have winrar installed for this way] :1. create the shorcut on desktop named NOD32 Install for your AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.bat2. copy this shortcut in AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\ folder [needed part]3. right click the shortcut placed in AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\ folderchoose add to archive4. check create sfx archive and create solid archive and compression method=bestname the archive what you want, but remember is an .exe now . i will say here installnod32.exe5. go to tab fileson files to add, delete [DEL] the file there [will be install.bat not the shortcut to install.bat]click append... and choose your shortcut .press ok.now you will have a SFX rar archive [an exe file] who contain your shortcut.6. during your XP install place this SFX on desktop [there are tens methods for that]7. when you will execute the installnod32.exe , will extract on the desktop your shortcut.if you want to do this silent [without asking you]before press ok , in winrar , go to comment tab andwrite in enter a comment manually windowSilent=1Overwrite=1if you want to run automatically [when you execute your installnod32.exe] the shortcutthis means execute your AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batadd there in comment tabSetup="NOD32 Install.lnk"or maybe i do not understand what you want ? Link to comment Share on other sites More sharing options...
fatman01 Posted June 6, 2007 Author Share Posted June 6, 2007 Path: AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batShortcut Name: NOD32 InstallInfo Tip: Install this on first boothow i do it with WINRAR [you must have winrar installed for this way] :1. create the shorcut on desktop named NOD32 Install for your AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.bat2. copy this shortcut in AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\ folder [needed part]3. right click the shortcut placed in AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\ folderchoose add to archive4. check create sfx archive and create solid archive and compression method=bestname the archive what you want, but remember is an .exe now . i will say here installnod32.exe5. go to tab fileson files to add, delete [DEL] the file there [will be install.bat not the shortcut to install.bat]click append... and choose your shortcut .press ok.now you will have a SFX rar archive [an exe file] who contain your shortcut.6. during your XP install place this SFX on desktop [there are tens methods for that]7. when you will execute the installnod32.exe , will extract on the desktop your shortcut.nif you want to do this silent [without asking you]before press ok , in winrar , go to comment tab andwrite in enter a comment manually windowSilent=1Overwrite=1if you want to run automatically [when you execute your installnod32.exe] the shortcutthis means execute your AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batadd there in comment tabSetup="NOD32 Install.lnk"or maybe i do not understand what you want ?The part about hot to have this icon in Administrators and\or all users Desktop after the unattedd install is what I’m missing? Link to comment Share on other sites More sharing options...
fatman01 Posted June 6, 2007 Author Share Posted June 6, 2007 Path: AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batShortcut Name: NOD32 InstallInfo Tip: Install this on first boothow i do it with WINRAR [you must have winrar installed for this way] :1. create the shorcut on desktop named NOD32 Install for your AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.bat2. copy this shortcut in AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\ folder [needed part]3. right click the shortcut placed in AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\ folderchoose add to archive4. check create sfx archive and create solid archive and compression method=bestname the archive what you want, but remember is an .exe now . i will say here installnod32.exe5. go to tab fileson files to add, delete [DEL] the file there [will be install.bat not the shortcut to install.bat]click append... and choose your shortcut .press ok.now you will have a SFX rar archive [an exe file] who contain your shortcut.6. during your XP install place this SFX on desktop [there are tens methods for that]7. when you will execute the installnod32.exe , will extract on the desktop your shortcut.nif you want to do this silent [without asking you]before press ok , in winrar , go to comment tab andwrite in enter a comment manually windowSilent=1Overwrite=1if you want to run automatically [when you execute your installnod32.exe] the shortcutthis means execute your AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batadd there in comment tabSetup="NOD32 Install.lnk"or maybe i do not understand what you want ?The part about hot to have this icon in Administrators and\or all users Desktop after the unattedd install is what I’m missing? Link to comment Share on other sites More sharing options...
fatman01 Posted June 7, 2007 Author Share Posted June 7, 2007 I need details to the path and name of the program executable, also the desired Shortcut name, and info tip...Example:Path: C:\Program Files\Program Folder\executable.exeShortcut Name: Install ThisInfo Tip: Install this on first bootricktendo64 Not shure what u meen by (Info Tip) Link to comment Share on other sites More sharing options...
FrankE9999 Posted June 7, 2007 Share Posted June 7, 2007 (edited) There are many ways to create a shortcut from a batch file. You could simply create the shortcut in the same folder and copy it to the desktop. Just remember that the shortcut has a .lnk extension. From the batch file run the following copy /y "%~dp0My Shortcut.lnk" "%ALLUSERSPROFILE%\Desktop"Another option is to use shortcut.exe. Copy shortcut.exe to the same folder as your batch file and call it using "%~dp0shortcut.exe" or change to directory "%~dp0" or copy shortcut.exe to the System32 folder under your windows directory."%~dp0shortcut.exe" /F:"%ALLUSERSPROFILE%\Desktop\Notepad.lnk" /A:C /T:"C:\WINNT\system32\notepad.exe"note the above must be run from a patch file so "%~dp0" will expand to the path where the batchfile is located. If running from the command line specive the path to shortcut.exe or copy it to youe system32 folder.Use %USERPROFILE% from the administrator account in place of %ALLUSERSPROFILE% to create the icon on the current users desktop. Edited June 7, 2007 by FrankE9999 Link to comment Share on other sites More sharing options...
Gee Posted June 7, 2007 Share Posted June 7, 2007 (edited) Path: AIO-DVD\SETUP\XP\Professional\$OEM$\$1\Nod32\install.batShortcut Name: NOD32 InstallInfo Tip: Install this on first bootHere is what I would do.According to the above, you are copying a folder called Nod32 to the %SystemDrive% usually c:\I would move install.bat toAIO-DVD\SETUP\XP\Professional\$OEM$\$Docs\All Users\Desktop\Install.batThis will achieve exactly what you want, assuming the contents of your install.bat looks similar to this@echo off%SystemDrive%\Nod32\setup.exeor@echo offcd \Nod32setupThe custom icon will be a little tougher. Because you are using a batch file, there are no resources attached to it. You have to create an executable and then change the icon. That is a little more involved. Try the above, it will get you the shortcut on the desktop for all users.If you really want the icon, you will need RAR or 7z and create an switchless installer. Then use Resource Hacker to change the icon. Edited June 7, 2007 by Gee Link to comment Share on other sites More sharing options...
Silvereyes Posted June 7, 2007 Share Posted June 7, 2007 The best way to create a Custom Shortcut during an UnattendedInstall (HINT: Try reading the title ) is to create an inf file as shownbelow and 'install' it using the following command."rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\<filename>.inf"This creates two shortcuts, one in the specified start menu folder and anotheron the desktop. Which particular locations will depend on precisely when the inffile is 'installed'.If the file is 'installed' from cmdlines.txt they will be created in the DefaultUser directory and subsequently inherited by any account created afterwardsincluding Administrator.If the file is 'installed' from RunOnceEx they will only be created in theAdministrator directory during the first logon.To use the code shown below simply replace the <...> sections with theappropriate names and locations etc. These will use the default icon fromthe executable file. It is possible to override this to specified a particularicon but this would complicate things and you did wish it to be kept simple.BTW: Wouldn't it be easier to run your installation directly from RunOnceEx ?[Version]Signature = "$Windows NT$"[DefaultInstall]ProfileItems = StartMenuSC, DesktopSC[StartMenuSC]Name = "<product name>"CmdLine = 16422,"<program directory>",<executable filename>SubDir = "<start menu folder>"[DesktopSC]Name = "<product name>"CmdLine = 16422,"<program directory>",<executable filename>SubDir = "..\..\Desktop" Link to comment Share on other sites More sharing options...
Gee Posted June 7, 2007 Share Posted June 7, 2007 I am under the impression that he does not want the application installed unattended. But to allow the user to install it as they wish. Link to comment Share on other sites More sharing options...
fatman01 Posted June 8, 2007 Author Share Posted June 8, 2007 I want to thank everyone for all the information on this post. With all the info everyone sent IT WORKS! Thanks Again Link to comment Share on other sites More sharing options...
Silvereyes Posted June 8, 2007 Share Posted June 8, 2007 I am under the impression that he does not want the application installed unattended. But to allow the user to install it as they wish.That's certainly how I read his request. I just wondered why he chose this ratherthan the alternative. Link to comment Share on other sites More sharing options...
fatman01 Posted June 8, 2007 Author Share Posted June 8, 2007 Y es you are correct; the reason I ask for it this way is because NOD32 wouldn’t load my confg file at T-12 automatically without asking for more info. But if I loaded it after a complete install it would, and it would automatically start the update download. I would like to install it with a RunOnceEx command but I can’t seem to get it to work.Thanks again for the info Link to comment Share on other sites More sharing options...
gunsmokingman Posted June 8, 2007 Share Posted June 8, 2007 Have you thought of trying a VBS Script to make the shortcut on The AllUserDesktop.This will make a Shortcut on The AlllUserDesktop to Notepad.Save As SC_AllUserDeskTop.vbs Const ALL_USERS_DESKTOP = &H19& Dim Shell :Set Shell = CreateObject("Shell.Application") Dim Act :Set Act = CreateObject("Wscript.Shell") Dim AllUDesk, Folder, FolderItem, Link Set Folder = Shell.Namespace(ALL_USERS_DESKTOP) Set FolderItem = Folder.Self AllUDesk = FolderItem.Path Set Link = Act.CreateShortcut(AllUDesk & "\My ShortCut Link.lnk")'/-> Place A Full Path In The Link.TargetPath EG Link.TargetPath = HD:\Folder\ItemName.exe Link.TargetPath = "Notepad.exe" Link.WindowStyle = 1 Link.Hotkey = "CTRL+SHIFT+F"'/-> Icon Location, EG Link.IconLocation = "notepad.exe, 0", EG Link.IconLocation = "HD:\Folder\ItemName.exe, 0" Link.IconLocation = "shell32.dll, 200" Link.Description = "Pop Up Details Here" Link.WorkingDirectory = AllUDesk Link.SaveIf you wanted this to run showing a cmd windowSave As Comspec_SCAllUDesk.vbs Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject") Dim Act :Set Act = CreateObject("Wscript.Shell") Dim Ts, Vbs, V1 Vbs = Act.ExpandEnvironmentStrings("%SystemDrive%\SCAllUDesk.vbs") Set Ts = Fso.CreateTextFile(Vbs) Ts.WriteLine " Const ALL_USERS_DESKTOP = &H19&" Ts.WriteLine " Dim Shell :Set Shell = CreateObject(""Shell.Application"")" Ts.WriteLine " Dim Act :Set Act = CreateObject(""Wscript.Shell"")" Ts.WriteLine " Dim AllUDesk, Folder, FolderItem, Link, V1" Ts.WriteLine " Set Folder = Shell.Namespace(ALL_USERS_DESKTOP)" Ts.WriteLine " Set FolderItem = Folder.Self" Ts.WriteLine " V1 = Space(2) & Chr(187) & Chr(160)" Ts.WriteLine " AllUDesk = FolderItem.Path" Ts.WriteLine " Wscript.Echo V1 & ""Preparing To Add The ShortCut Link"" " Ts.WriteLine " Wscript.Sleep 2000" Ts.WriteLine " Set Link = Act.CreateShortcut(AllUDesk & ""\My ShortCut Link.lnk"")" Ts.WriteLine "'/-> Place A Full Path In The Link.TargetPath EG Link.TargetPath = HD:\Folder\ItemName.exe" Ts.WriteLine " Link.TargetPath = ""Notepad.exe""" Ts.WriteLine " Link.WindowStyle = 1" Ts.WriteLine " Link.Hotkey = ""CTRL+SHIFT+F""" Ts.WriteLine "'/-> Icon Location, EG Link.IconLocation = ""notepad.exe, 0"", EG Link.IconLocation = ""HD:\Folder\ItemName.exe, 0""" Ts.WriteLine " Link.IconLocation = ""shell32.dll, 200""" Ts.WriteLine " Link.Description = ""Pop Up Details Here""" Ts.WriteLine " Link.WorkingDirectory = AllUDesk" Ts.WriteLine " Link.Save" Ts.WriteLine " Wscript.Echo " Ts.WriteLine " Wscript.Echo V1 & ""Completed Adding The ShortCut Link"" " Ts.WriteLine " Wscript.Sleep 3000" Ts.Close Set V1 = Fso.GetFile(Vbs) Act.Run("%Comspec% /c @Echo Off && Color 9E && Title ShortCut Link " &_ "&& cscript.exe " & Chr(34) & V1.Path & chr(34)),1,True V1.Delete() 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