chrisdewey Posted November 1, 2018 Share Posted November 1, 2018 Hi, I have a powershell script that works but i would like to make a .exe file and think the best option is to see if anyone can help me convert it into AutoIT. I am trying to Install font without the need for admin. So I am hoping to convert this to AutoIT script format expandcollapse popup$SourceDir = "C:\source\MMP-Fonts\" $Source = "C:\source\MMP-Fonts\*" $Destination = (New-Object -ComObject Shell.Application).Namespace(0x14) $TempFolder = "C:\Windows\Temp\Fonts" # Create the source directory if it doesn't already exist New-Item -ItemType Directory -Force -Path $SourceDir New-Item $TempFolder -Type Directory -Force | Out-Null Get-ChildItem -Path $Source -Include '*.ttf','*.ttc','*.otf' -Recurse | ForEach { If (-not(Test-Path "C:\Windows\Fonts\$($_.Name)")) { $Font = "$TempFolder\$($_.Name)" # Copy font to local temporary folder Copy-Item $($_.FullName) -Destination $TempFolder # Install font $Destination.CopyHere($Font,0x10) # Delete temporary copy of font Remove-Item $Font -Force } } Link to comment Share on other sites More sharing options...
Developers Jos Posted November 1, 2018 Developers Share Posted November 1, 2018 17 minutes ago, chrisdewey said: So I am hoping to convert this to AutoIT script format So, what exactly is the question? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
chrisdewey Posted November 1, 2018 Author Share Posted November 1, 2018 Hi Jos, Is it possible? and does anyone have any information useful links i can read up on. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 1, 2018 Developers Share Posted November 1, 2018 Have you check searching for the forum topics we already have? Try this link: https://www.google.com/search?q=install+font+site%3Awww.autoitscript.com&oq=install+font+site%3Awww.autoitscript.com Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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