Jump to content

Append username to end of URL?


Go to solution Solved by JLogan3o13,

Recommended Posts

I've done some searching on this, and I think @username may help to get logged in user, but wasnt sure.  I need to get the currently logged in username (ABCD), and append it to the end of a url that comes up when running a program.

For example:

$x = filecopy(@ScriptDir & "\test.ico", @WindowsDir & "\test.ico", 9)


FileCreateShortcut(@ProgramFilesDir & "\internet explorer\iexplore.exe", @DesktopCommonDir & '\test.lnk', '', 'http://urltestlogin=~uid:ABCD', "", @WindowsDir & "\options\example\test.ico" )

; Pins to start menu

$objShell = ObjCreate("Shell.Application")
$objFolder = $objShell.Namespace(@DesktopCommonDir)
$objFolderItem = $objFolder.ParseName("Example.lnk")

For $val in $objFolderItem.Verbs()
    If StringInStr($val(), "Pin to") Then $val.DoIt()
    Next
    
    TraySetState()
    TraySetToolTip("Example")
    
            Sleep(10); idle loop
    
    
    Exit
Edited by obfuscatedv
Link to comment
Share on other sites

  • Moderators
  • Solution

You could do something like this:

'http://urltestlogin=~uid:' & @UserName

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...