I've got a script that installs a certain BP Program called iLink (Crosslink). The Script works fine and installs Java 6.21 and both Crosslink Components and also installs through DISM .Net 3.5 perfectly.
However, the only drawback is that the web version only works on a admin run internet explorer process. I've got it to create a shortcut on the users desktop but I want the script to change the target of it from: "C:Program FilesInternet Exploreriexplore.exe" to runas.exe /user:capeplca-bhargate /savecreds "C:Program FilesInternet Exploreriexplore.exe"
This is the script I've currently got I just want it to add it to the end or something to change the target of the shortcut:
# ...
$TargetFile = "C:Program FilesInternet Exploreriexplore.exe"
$ShortcutFile = "$env:USERPROFILEdesktopIEadmin.lnk"
$WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Save()
The script outcome is fine, just need the shortcuts target changing to the one mentioned above in bold. Any help would be great!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…