| |
buechler66
Posts: 2
Score: 0
Joined: 9/21/2007
Status: offline
|
Hi. I'm trying to use the following script to create an icon on the users Desktop. In line 4 I attempt to use the %USERNAME% variable, but this line errors out when I run the script. Is this the proper way to substitute for the user's desktop directory? Any help would be greatly appreciated. Thanks. ___________________________________________________________________________________________________________ 'Create a WshShell Object Set WshShell = Wscript.CreateObject("Wscript.Shell") 'Create a WshShortcut Object Set oShellLink = WshShell.CreateShortcut("C:\Documents and Settings\%USERNAME%\My Documents\TTMS Menu (Web).lnk") 'Set the Target Path for the shortcut oShellLink.TargetPath="C:\Program Files\Internet Explorer\iexplore.exe" 'Set Arguments for Target Path for the shortcut oShellLink.Arguments="http://springfield01:7777/forms/frmservlet?config=ttmsmenu&userid=%orauser%/%orapass%@fc" 'Set Working Directory for the shortcut oShellLink.WorkingDirectory = "c:\" 'Set HotKey 'oShellLink.Hotkey = "ALT+SHIFT+T" oShellLink.WindowStyle = 2 oShellLink.IconLocation = "c:\ttmsapps\compiled\ttmsdataview.exe, 0" 'Save the shortcut oShellLink.Save 'Clean up the WshShortcut Object Set oShellLink = Nothing
|
|