Jump to content

Append username to end of URL?


Go to solution Solved by JLogan3o13,

Recommended Posts

Posted (edited)

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

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
×
×
  • Create New...