Jump to content
Sign in to follow this  

Append username to end of URL?

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()
            Sleep(10); idle loop
Edited by obfuscatedv

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...