Jump to content

Quick launch


Recommended Posts

I would like to know, how can I find the quick launch's path.

Thanks

Csaba

If I understand correctly you need to luse FileGetShortcut


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

dabus answered the question already :o

anyway

; Tested on Windows XP
$userQuickLaunchPath = @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch"
$globalQuickLaunchPath = @AppDataCommonDir & "\Microsoft\Internet Explorer\Quick Launch"

$shortcutTarget = @WindowsDir & "\notepad.exe";pick whatever you want
FileCreateshortcut($shortcutTarget, $userQuickLaunchPath & "\Notepad.lnk")
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

dabus answered the question already :o

anyway

; Tested on Windows XP
$userQuickLaunchPath = @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch"
$globalQuickLaunchPath = @AppDataCommonDir & "\Microsoft\Internet Explorer\Quick Launch"

$shortcutTarget = @WindowsDir & "\notepad.exe";pick whatever you want
FileCreateshortcut($shortcutTarget, $userQuickLaunchPath & "\Notepad.lnk")
One note - the All Users directory for Quick Launch is pretty much useless as shortcuts put here do NOT show up in the ANYONE'S Quick Launch tool bar (unless there's a reg hack I don't know of to enable that?!). Ad-Aware SE Personal puts a shortcut there, but it doesn't show up in my Quick Launch Tool Bar.

However, shortcuts put in "Default User\Application Data\Microsoft\Internet Explorer\Quick Launch" (under the Profile directory*), WILL be added to NEW USERS' Quick Launch toolbar on their first log in. This behavior is contrary to the way the "All Users\Desktop" directory behaves (Thanks Bill!) where shortcuts put there WILL appear on ALL Users' Desktop.

*Editorial note:

The Profile directory is defined in the registry key "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" under the value named "ProfilesDirectory" which is typically a REG_EXPAND_SZ value and needs to have the %SystemDrive% environment variable evaluated.

While, as far as I know, this is usually "C:\Documents and Settings", in large network environments this could be redefined as a network share or mapped drive. I've had endless bickering with kjactive due to the fact that we both assumed we knew where @ProgramFilesDir was. It took MONTHS for us to realize he assumed C:\Programs, and I assumed "C:\Program Files". We were both right - apparently Euro versions of Windows use a different directory structure! Never ASS_U_ME!

I've requested the macro @ProfileDir so that coders could simply use @ProfileDir instead of

#include-once
Global $ProfileDir
$ProfileDir = RegRead ( 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList', 'ProfilesDirectory' )
$sEnvStr = StringMid ( $ProfileDir, StringInStr($ProfileDir,'%',0,1)+1, StringInStr($ProfileDir,'%',0,2)-StringInStr($ProfileDir,'%',0,1)-1 )
$sEnvVal = EnvGet ( $sEnvStr )
$ProfileDir = StringReplace ( $ProfileDir, '%' & $sEnvStr & '%', $sEnvVal )
to get the location of the Profile Directory reliably. I've gotten plenty of replies on how to get it (I obviously know how - and more reliably than most replies), but the request has gotten neither an OK or NO.

Oh yea, and if you think this is silly, keep coding "C:\Documents and Settings\Default User" instead of $ProfileDir & '\Default User' - or some other standard profile directory there's no macro for (Administrator, LocalService, NetworkService), and see how well that works in Vista (WON'T!).

Link to comment
Share on other sites

@Jerry...

sounds like you understand alot here

One note - the All Users directory for Quick Launch is pretty much useless as shortcuts put here do NOT show up in the ANYONE'S Quick Launch tool bar

if i am not mistaken

; Tested on Windows XP
$userQuickLaunchPath = @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch"
$globalQuickLaunchPath = @AppDataCommonDir & "\Microsoft\Internet Explorer\Quick Launch"

$shortcutTarget = @WindowsDir & "\notepad.exe";pick whatever you want
FileCreateshortcut($shortcutTarget, $userQuickLaunchPath & "\Notepad.lnk")

just worked on my Win XP

...

but i do like your direction so that our scripts/programs will work for Vista

8)

NEWHeader1.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...