Jump to content
Ketarin forum
  • Announcements

g00p3k

Powershell Variables

Recommended Posts

I've tried dumping $app and $globalvars in a variety  of ways to find t he correct variable names to migrate command scripts to  powershell  but am not  having any luck. Could someone provide  some assistance on this and perhaps the app  could be updated with a cheat sheet/drop down to help insert the variables for Ketarin. I have a lot of usage  of {startupath} etc and once I know how to map correctly I want to migrate these  over to using Powershell 5

 

I read through the powershell post but wasn't able to make progress with it. thanks!

Share this post


Link to post
Share on other sites
$WShell = New-Object -ComObject WScript.Shell
$ShortCut = $WShell.CreateShortcut("$env:AppData\Microsoft\Internet Explorer\Quick Launch\$($App.Name).lnk")
$Shortcut.TargetPath = "$env:SystemDrive\$($App.Name)\$($App.Name).exe"
$Shortcut.WorkingDirectory = "$env:SystemDrive\$($App.Name)"
$Shortcut.IconLocation = "imageres.dll,-65"
$Shortcut.Save()

That's an example from to the wiki. To access the variables use $App.Variables.{"myvariable"}.TextualContent for Text variables and $App.Variables.{"myvariable"}.CachedContent

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


×