How to run Multiple shell command without hangs in vb.net - vb.net

Please someone help me!
Cannot run Multiple shell command in vb.net
when run the shell command in projects , the projects is hangs until command is finish.
And how to run without hangs in projects.
Thanks...
Sorry for Spelling.

Try using Process.Start() instead. It is only slightly different but is more powerful. By default it will not wait. But you can wait by getting the process it creates and then waiting on it to exit.

Related

Browsing IE via its COM object in Powershell

I've written a Powershell script to automate a Web UI test using IE. The script runs fine when I execute it from PowerShell. However, I have run into an obscure problem and that is when I run my Web UI test script from another powershell script, it fails. I tried to debug it and found that it fails on the following line.
$button = $ie.Document.getElementsByTagName("button")
$button.Item().Click() # $button.Item() evaluates to null when the script is executed from another script.
Can anyone help me figure this out? It appears that when I run the script, the script has no issues locating the element, but when it is run from another script the element I am looking for cannot be located.
EDIT
I get the same error when I run the PS script through Task Scheduler. The script only works when I invoke it directly. If I invoke via another script/program, it doesn't work.

mem_test.bat file does not execute

I am in the middle of designing a schematic in Xilinx ISE 14.7 core generator and I've run into a little problem which I need help with. I need to run mem_edit.bat file in order to run the memory editor application and create a .coe file. Whenever I run the file, command prompt just flashes on the screen without running the commands. How do I run mem_edit.bat to be able to run memory test. I have run the file in a static command prompt session and inserted a pause in the code to no avail. I have also run the commands directly in command prompt and still no success. Please help me as I am on a timeline and I need to finish this fast. I am running on a 64 bit windows10 machine. I am kinda new to Xilinx ISE so please go a bit easy on me. The contents of mem_edit.bat have been quoted below
#echo off
REM Script to launch Xilinx memory editor
set CLASSPATH=
set JAVA_HOME=
"%XILINX%\java\nt64\jre\bin\java" -DXILINX="%XILINX%" -DMYXILINX="%MYXILINX%" -cp "%XILINX%\coregen\lib\encore.jar;%XILINX%\coregen\lib\coreutil.jar;%XILINX%\coregen\lib\sim.jar;%XILINX%\coregen\lib\xcc.jar;%XILINX%\coregen\lib;%XILINX%\coregen\resources" com.xilinx.iputils.memory.editor.CoreGen2RunMemoryEditor 2> NUL
I have managed to solve the issue. I happened to stumble on the directory where the ISE cmd short cut is saved C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Xilinx Design Tools 1\ISE Design Suite 14.7\Accessories. I run the file and Kaboom, the ISE cmd fired up. I entered mem_edit.bat and the application is up and running.

A Powershell script executed in SSIS doesn't seem to do anything

I have a simple (test) Powershell script, it creates an empty file. The script runs fine executed manually in Powershell. However it does nothing when executed in SSIS.
I've tried executing it in an Execute Process task and also in a VB.Net Script task.
Both times Poweshell seems to open (I see the screen come up and close quickly), however the file that the script tries to create doesn't get created.
Any ideas how to troubleshoot this would be appreciated!
Thank you!
Adding -ExecutionPolicy ByPass is what made it work. So now what I am passing is:
-ExecutionPolicy ByPass -file "\\SERVER\Share\Script.ps1"
This is where I got this tip - http://www.sqlservercentral.com/Forums/Topic1714552-147-1.aspx
After I added this, Read-Host started working also and paused the execution of the script.

Executing AutoIT script from vb.net

I am successfully running a Autoit script from command prompt.
"Z:\AutoItScripts\test.au3" "parameter1"
I need to do same from VB.net. Please help how can I do this.
Use Shell
eg
Shell("Z:\AutoItScripts\test.au3 parameter1")

Remove-SPServiceApplication Hangs

I am attempting to run the following Powershell command to remove a service application. The command never returns and just hangs and hangs. Anyone now why?
Remove-SPServiceApplication -Identity -RemoveData
SharePoint timer service was stopped causing the script to hang.