obfuscatedv Posted November 12, 2013 Share Posted November 12, 2013 (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 November 12, 2013 by obfuscatedv Link to comment Share on other sites More sharing options...
Moderators Solution JLogan3o13 Posted November 12, 2013 Moderators Solution Share Posted November 12, 2013 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 More sharing options...
obfuscatedv Posted November 12, 2013 Author Share Posted November 12, 2013 Lol, I'm an idiot. Thanks JLogan. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now