-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By ptrex
DLLCalls using VBScripts
Out if the box it is not possible to do DllCalls from VBScripts. But thanks to the +20 year COM Library called DynaWrap this is still possible
Anyhow the process of calling Win API functions need some basic knowledge and understanding on how to do this.
More specifically the input Data Types parameters used and Calling Formats are key here, as well as the Return Data Types
DynaWrap COM Library
Keep in mind that this COM Library is a 32Bit only library. Which means that you need to register is using the SysWOW64 regsvr32
But to overcome this annoyance I created RegFree method so you can start using it as a portable COM Library
DynaWrap Documentation
I created a PDF documention on what I still could find on the internet on how to use the COM Library.
Examples
The second post will hold some VBScript Examples and an AutoIt Example
Attached
You will find the PDF and the ZIP File needed to run your code in a portable way.
Thanks to the @Professor_Bernd to provide the VBScript code to get the VBScript scripting directory and the Shortcut to run the 32Bit SysWOW64 VBScript host
Just drop the VBScript on the 32Bit Shortcut to get going.
Source Code
Anyhow here you can find the source code of the DynaWrap 32Bit Library.
If someone has the C++ Tools to convert it to 64Bit Library that would give a new live to it...
http://www.borncity.com/web/WSHBazaar1/WSHDynaCall.htm
Interesting reading :
https://www.drdobbs.com/windows/an-automation-object-for-dynamic-dll-cal/210200078
DynaCall.zip How to use DllCalls in VBScript using DynaWrap COM Object.pdf
-
By antonioj84
any assistance how to incorporate this powershell command within autoit
powershell.exe -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -command "&Set-WinUserLanguageList -LanguageList fr-CA, en-CA -Force"
-
By Exit
For my next project I would like to send files with "alternate data streams" by email in ZIP format.
I can not use any external program like 7-Zip or WinRAR. (They would fit😥)
Who knows how to create a ZIP file with "alternate data streams" included with the Powershell command "Compress-Archive"?
Here a test script: (save as "ADSTester.cmd")
@rem Try to create a zip file with alternate data streams (ADS) included @rem Housekeeping @cls @del ADSTester.zip >nul: @RD /S /Q Extracted >nul: @del ADSTester.txt >nul: @rem End of Housekeeping echo This is the ADSTester.txt file >ADSTester.txt echo This is the ADSTester.txt:Part1 file >ADSTester.txt:Part1 echo This is the ADSTester.txt:Part2 file >ADSTester.txt:Part2 dir /r ADSTester.txt @rem See the 3 files @rem **************************************************************** @rem **************************************************************** @rem Please alter the next lines to include the alternate data streams. powershell Compress-Archive -Path .\ADSTester.txt -Update -DestinationPath ADSTester.zip powershell Expand-Archive -Path ADSTester.zip -DestinationPath .\Extracted\ dir /r Extracted\ADSTester.txt @rem Only one file left :-( pause
-
By ur
Which Powershell command in the PowerCLI module for VMware ESX used to interact with UI apps?
When I launch any exe/any exeutable using powercli on guest VM using powercli command.
Invoke-VMScript, I am able to run them in the background but not in the foreground.
i.e., UI apps are not launching but showing the background as running in the task manager.
We need our UI Automation scripts to execute in the VM, but it is not working.
We are able to do in virtualbox and hyper-v but not in vmware esx using powercli.
Please suggest.
-
By ambad4u
Hello and Good Day to All!
I am trying to install .NET 3.5 on Windows 10 x64bit via autoit (via ShellExecuteWait + PowerShell).
If I run this line, it will runs without issues:
ShellExecuteWait('PowerShell.exe', '-executionpolicy Bypass -File "' & @ScriptDir & '\OJP83BU523.ps1' & '"') "OJP83BU523.ps1" contains: DISM /Online /Enable-Feature /FeatureName:NetFX3 /All /Source:D:\Sources\sxs /LimitAccess
However, since I won't know in advance the drive letter of the "sources" folder, I created a script to generate a PowerShell Script to give a correct path for it.
With the modified script below, PowerShell only blinks and nothing happens
ShellExecuteWait('PowerShell.exe', '-executionpolicy Bypass -File "' & @ScriptDir & '\' & $filename & '"') or
ShellExecuteWait('PowerShell.exe', '-executionpolicy Bypass -File "' & $filename & '"')
I wish I know the difference with "$filename" and "\OJP83BU523.ps1" usage, as for me, it should be the same.
Attached is my entire autoit script.
any help is appreciated!, many thanks in advance!
test.au3
-