Jump to content
Sign in to follow this  
obfuscatedv

Append username to end of URL?

Recommended Posts

obfuscatedv

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

Share this post


Link to post
Share on other sites
JLogan3o13

You could do something like this:

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

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
obfuscatedv

Lol, I'm an idiot. Thanks JLogan.

Share this post


Link to post
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
Sign in to follow this  

×