Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 14:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Shourtcut in AutostartFolder

Discussion on Shourtcut in AutostartFolder within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
iTim's Avatar
 
elite*gold: 625
Join Date: Oct 2008
Posts: 767
Received Thanks: 60
Shourtcut in AutostartFolder

Moin Com !
Ich arbeite gerade an einem AutoIt Projekt.
Ich möchte eine Funktion einbauen die mir ein Shourtcut erstellt & dieses dann in den Autostart Ordner legt. Ich weiß, wie man das per Registery machet, doch mit dem Autostart Folder klappt nicht.


Code
Code:
	$shortcut = FileCreateShortcut($data , "test.lnk")
	FileCopy($shortcut , @StartupCommonDir & "\Startup\")
Der Shourtcut wird erstellt aber nicht in den Autostart Ordner kopiert.

Wie bekomm ich das hin ?
iTim is offline  
Old 09/03/2011, 16:53   #2
 
BlackHybrid's Avatar
 
elite*gold: 52
The Black Market: 101/0/0
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
FileCreateShortcut gibt nur True oder False zurück.
Also musst du bei FileCopy nicht $shortcut als ersten Parameter nehmen sondern den Pfad.
BlackHybrid is offline  
Old 09/03/2011, 17:03   #3
 
iTim's Avatar
 
elite*gold: 625
Join Date: Oct 2008
Posts: 767
Received Thanks: 60
ich weiß jetzt nicht genau was du meinst, aber ich hab gerade schon ne lösung gefunden.trotzdem danke für deine antwort !
iTim is offline  
Old 09/03/2011, 18:05   #4
 
BlackHybrid's Avatar
 
elite*gold: 52
The Black Market: 101/0/0
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
Mach einfach mal MsgBox(1,"",$shortcut) unter FileCreateShortcut.
Dann siehst du warum es nicht geht.
$shortcut beinhaltet dann lediglich eine 1 oder 0 und kein Dateipfad.
BlackHybrid is offline  
Old 09/06/2011, 20:29   #5
 
elite*gold: 280
Join Date: Nov 2009
Posts: 2,005
Received Thanks: 26,683
Das erstellt z.b bei mir nen Auto-Start eintrag für mein Passwortprogramm, such dir raus was du brauchst.

Ist aber für Win7

FileCreateShortcut(@WindowsDir & "\System32\schtasks.exe",@AppDataDir & "\Microsoft\Windows\Start Menu\Programs\Startup\pw_Start.lnk",@WindowsDir,' /run /tn "pw"', "by Dr.Bob", @SystemDir & "\shell32.dll", "^!t", "15", @SW_MINIMIZE)
*Dr.Bob* is offline  
Old 09/08/2011, 22:41   #6
 
elite*gold: 0
Join Date: Feb 2010
Posts: 41
Received Thanks: 5
Du kannst auch den Autostart-Eintrag in die Registry setzen:
Code:
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Run","test","REG_SZ","""C:\Temp\test.exe""")
Dies erstellt dir im Autostart-Schlüssel des aktuellen Benutzers unter dem Namen test einen Wert "C:\Temp\test.exe"
Du kannst """C:\Temp\test.exe""" auch durch '"C:\Temp\test.exe"' ersetzen
theboegl is offline  
Reply




All times are GMT +1. The time now is 14:44.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.