» An ultimate catalog of computer data
Forum posts for start1.exe
Interpret Variable in Powershell { } scriptblock
I have a shell script which should start a .exe in the background:
$strPath = get-location
$block = {& $strPath'storageinstorage.exe' $args}
start-job -scriptblock $block -argumentlist '-f', $strPath'storageconfstorage.conf'
In a preceding Question I found out that I need absolute Paths. However the $strPath variable isn't interpreted, if you look at the command:
PS Q:mlesetl-i_test> .iprog.ps1 --start1
Start Storage
Id Name State HasMoreData Location Command
-- ---- ----- ----------- -------- -------
37 Job37 Running True localhost & $strPath'storagei...
How can I fix this?
Edit: I understand I need to pass the path as an argument, and how? Something like:
$block = {& $args[0]'storageinstorage.exe' $args[1] $args[2]}
start-job -scriptblock $block -argumentlist $strPath, '-f', $strPath'storageconfstorage.conf'
?
View complete forum thread with replies
Other posts related to start1.exe
See Related Forum Messages: Follow the Links Below to View Complete Thread
Calculate if 2 or more dates overlap
generate word document
extract a stored png image from a binary file the right way
Utility started from python code doesn't write in file
Interpret Variable in Powershell { } scriptblock
save word document that's been created dynamically using SaveFileDialog?
Getting error when opening word document using Word Interop C#
Using Rx Repeat() and Replay() to cache and restart a DNS query