Jump to content

Kısayol Attırma


digitall
 Share

Recommended Posts

Arkadaşlar elimde bir program var sorunsuz kurulum yapıyor katılımsız ancak masa üstüne kısayol atmıyor kurulumdan sonra yani bat ya da cmd dosyası ile kısayolunu masa üstüne attırmak istiyorum kurulumdan sonra özellikle bat olursa çok makbule geçecek aradım ancak bulamadım affola saygılarımla...

Link to comment
Share on other sites

VBScript ile yapılabilir. Örnek ;

set WshShell = WScript.CreateObject("WScript.Shell" )
strDesktop = WshShell.SpecialFolders("AllUsersDesktop" )
set oShellLink = WshShell.CreateShortcut(strDesktop & "\WinRaR Kısayol.lnk" )
oShellLink.TargetPath = "C:\Program Files\WinRAR\WinRaR.exe"
oShellLink.WindowStyle = 1
oShellLink.Description = "Divane"
oShellLink.WorkingDirectory = "C:\Program Files\WinRAR"
oShellLink.Save

Uzantısını .vbs olarak kaydedeceksin.

Link to comment
Share on other sites

@Echo off

rem Window Style
REM 1 = Normal, 3 Maximized, 7 = Minimized

rem Choose "Desktop" or "AllUsersDesktop"
set Location="Desktop"

set DisplayName="My Shortcut"
set filename="c:\somedir\myfile.exe"

REM Set icon to an icon from an exe or "something.ico"
set icon="notepad.exe, 0"

set WorkingDir="C:\somedir"

set Arguments="xxx"

REM Make temporary VBS file to create shortcut
REM Then execute and delete it

(echo Dim DisplayName,Location,Path,shell,link
echo Set shell = CreateObject^("WScript.shell"^)
echo path = shell.SpecialFolders^(%Location%^)
echo Set link = shell.CreateShortcut^(path ^& "\" ^& %DisplayName% ^& ".lnk"^)

echo link.Description = %DisplayName%
echo link.TargetPath = %filename%
echo link.Arguments = %arguments%

echo link.WindowStyle = 7
echo link.IconLocation = %icon%

echo link.WorkingDirectory = %WorkingDir%
echo link.Save

)> "%temp%\makelink.vbs"
cscript //nologo "%temp%\makelink.vbs"
del "%temp%\makelink.vbs" 2>NUL
Link to comment
Share on other sites

Eyvallah ustam teşekkür ederim.

 

 

@Echo off

 
set Location="Desktop"
set DisplayName="Kısayol Adı"
set Filename="%ProgramFiles%\Program Klasörü\Program Adı.exe"
set Icon="%ProgramFiles%\Program Klasörü\Program Adı.exe"
set WorkingDir="%ProgramFiles%\Program Klasörü"
 
REM Make temporary VBS file to create shortcut
REM Then execute and delete it
 
(echo Dim DisplayName,Location,Path,shell,link
echo Set shell = CreateObject^("WScript.shell"^)
echo path = shell.SpecialFolders^(%Location%^)
echo Set link = shell.CreateShortcut^(path ^& "\" ^& %DisplayName% ^& ".lnk"^)
echo link.TargetPath = %FileName%
echo link.IconLocation = %Icon%
echo link.WorkingDirectory = %WorkingDir%
echo link.Save
 
)> "%temp%\makelink.vbs"
cscript //nologo "%temp%\makelink.vbs"
del "%temp%\makelink.vbs" 2>NUL
Edited by digitall
Link to comment
Share on other sites

nircmd ile yapabilirsiniz. nircmd komut isteminden daha fazla işlem yapabilmenizi sağlayan bir programdır.

nircmd programını komut dosyası ile aynı klasöre atacaksınız ve aşağıdaki komutu kullanacaksınız.

nircmd.exe shortcut "~$folder.programfiles$\Nero\Nero Burning ROM\nero.exe" "~$folder.desktop$\Nero Express" "/w" 
Link to comment
Share on other sites



;Dosya Adı|Kısayol konumu|Çalışma dizini|Parametre|Açıklama|Simge|Simge numarası|Başlagıç sitili|Kısayol tuşu
SK_SHORTCUT("nero.exe", @DesktopDir & "\Nero Express", @ProgramFilesDir & "\Nero\Nero Burning ROM", "/w", "Hazırlayan : SimpsoN_Bart")
Func SK_SHORTCUT($DOSYA_ADI, $LNK, $CALISMADIZINI = "", $PARAM = "", $ACIKLAMA = "", $SIMGE = "", $NSIMGE = 0, $DURUM = "", $KISAYOLT = "")
	Local $KLASOR
	If $NSIMGE = "" Then $NSIMGE = 0
	If StringRight($LNK, 4) <> ".lnk" Then $LNK &= ".lnk"
	If Not StringInStr($DOSYA_ADI, ":\", 0) Then $DOSYA_ADI = @ScriptDir & "\" & $DOSYA_ADI
	If Not FileExists($DOSYA_ADI) Then Return -1
	$KLASOR = StringSplit($LNK, "\")
	$KLASOR = StringLeft($LNK, StringInStr($LNK, $KLASOR[$KLASOR[0]]) - 2)
	If Not FileExists($KLASOR) Then DirCreate($KLASOR)
	FileCreateShortcut($DOSYA_ADI, $LNK, $CALISMADIZINI, $PARAM, $ACIKLAMA, $SIMGE, $KISAYOLT, $NSIMGE, $DURUM)
EndFunc   ;==>SK_SHORTCUT

Bunun yerine ufak bir program daha var şöyle biraz incelersin.

Shortcut.exe Parametresi

Shortcut.exe /F:filename /A:C|E|Q [/T:target] [/P:parameters] [/W:workingdir]
         [/R:runstyle] [/I:icon,index] [/H:hotkey] [/D:description]

 /F:filename    : Specifies the .LNK shortcut file.
 /A:action      : Defines the action to take (C=Create, E=Edit or Q=Query).
 /T:target      : Defines the target path and file name the shortcut points to.
 /P:parameters  : Defines the command-line parameters to pass to the target.
 /W:working dir : Defines the working directory the target starts with.
 /R:run style   : Defines the window state (1=Normal, 3=Max, 7=Min).
 /I:icon,index  : Defines the icon and optional index (file.exe or file.exe,0).
 /H:hotkey      : Defines the hotkey, a numeric value of the keyboard shortcut.
 /D:description : Defines the description (or comment) for the shortcut.

 Notes:
 - Any argument that contains spaces must be enclosed in "double quotes".
 - If Query is specified (/A:Q), all arguments except /F: are ignored.
 - To find the numeric hotkey value, use Explorer to set a hotkey and then /A:Q
 - To prevent an environment variable from being expanded until the shortcut
   is launched, use the ^ carat escape character like this: ^%WINDIR^%

 Examples:
   /f:"%ALLUSERSPROFILE%\Start Menu\Programs\My App.lnk" /a:q
   /f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:c /t:^%WINDIR^%\Notepad.exe /h:846
   /f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:e /p:C:\Setup.log /r:3

 An argument of /? or -? displays this syntax and returns 1.
 A successful completion will return 0.

Link to comment
Share on other sites

nircmd.exe shortcut "~$folder.programfiles$\Nero\Nero Burning ROM\nero.exe" "~$folder.desktop$\" "Nero Express" "/w"

Ustam 64 bitte çalışmıyor. Yol şu şekilde nasıl yapacağımı bilemedim.

 

C:\Program Files (x86)\Nero\Nero Burning ROM

Link to comment
Share on other sites

Autoitle hazırladım, neroyu kendi bildiğin gibi kurdur enson bu exeyi çalıştır kısayol atar...

 

Kod İçeriği;

#RequireAdmin
#region
#AutoIt3Wrapper_Icon=NeroEx.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Description=Nero Kısayol
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_Field=ProductName|Nero Express
#AutoIt3Wrapper_Res_Field=Write Time|%date% %time%
#AutoIt3Wrapper_Res_Language=1055
#AutoIt3Wrapper_Run_Tidy=y
#endregion

If @OSArch = "X86" Then
	FileCreateShortcut(@ProgramFilesDir & "\Nero\Nero Burning ROM\nero.exe", @DesktopDir & "\Nero Express.lnk", @ProgramFilesDir, "", "Nero Burning ROM", @ProgramFilesDir & "\Nero\Nero Burning ROM\nero.exe", @SW_MAXIMIZE)
Else
	FileCreateShortcut(@HomeDrive & "\Program Files (x86)\Nero\Nero Burning ROM\nero.exe", @DesktopDir & "\Nero Express.lnk", @HomeDrive, "", "Nero Burning ROM", @HomeDrive & "\Program Files (x86)\Nero\Nero Burning ROM\nero.exe", @SW_MAXIMIZE)
EndIf

Compile Edilmiş Hali;

 

http://www.mediafire.com/download/baxctxmwy5v6pa7/Nero_Express.exe

Link to comment
Share on other sites

Ustam yapyığım katılımsız nerosu sadece nero burning romdan oluşuyor bende masa üstüne attığım nero kısayolunun sonun /w koyuyorum ve nero expressi direkt olarak açması sağlıyorum birde resim atayım.

rklru.jpg

Ama kardeşim daha çok işimi yarayacak olan reyiz kardeşin paylaşmış olduğu şey bu konuda yardımcı olursan daha çok sevinirim.

Esas sorun şu ki:

 

  1. nircmd.exe shortcut "~$folder.programfiles$\Nero\Nero Burning ROM\nero.exe" "~$folder.desktop$\" "Nero Express" "/w"

Ustam 64 bitte çalışmıyor. Yol şu şekilde nasıl yapacağımı bilemedim.

 

C:\Program Files (x86)\Nero\Nero Burning ROM

Link to comment
Share on other sites

Hocam hazırlıyorum istediğin gibi lakin şöyle daha garanti olur, program filesteki Nero\Nero Burning ROM\ klaörünün içinde nero expres exesi varmı eğer varsa ben masaüstüne ikisininde kısayolunu attırayım yoksa senin dediğin gibi yapıcaz...

Link to comment
Share on other sites

  1. nircmd.exe shortcut "~$folder.programfiles$\Nero\Nero Burning ROM\nero.exe" "~$folder.desktop$\" "Nero Express" "/w"

Ustam 64 bitte çalışmıyor. Yol şu şekilde nasıl yapacağımı bilemedim.

 

C:\Program Files (x86)\Nero\Nero Burning ROM

 

 

Esasen bunu 64 bitte yapabilirsem çok iyi olacak 32 bitte yukarıdaki sorunsuz.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...