when music played by this command:
PlayMMedia (MMEDIA_WAVE, SRCDIR + "1.wav", MMEDIA_PLAYCONTINUOUS , 0)
the setup will wait (freez) until the media finished it's play
so, how can i play the media in background when setup still working.
According to the documentation on the website ( http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011/mergedProjects/installshield17langref/LangrefPlayMMedia.htm ) you can specify the MMEDIA_PLAYASYNCH value, like so:
PlayMMedia( MMEDIA_WAVE, SRCDIR + "1.wav", MMEDIA_PLAYCONTINUOUS | MMEDIA_PLAYASYNCH, 0)
Does this work?
Related
Seems that New-CMTaskSequenceDeployment / Set-CMTaskSequenceDeployment cmdlet option -DeploymentOption does not work as expected.
I'm trying to automate a Task Sequence Deployment via Powershell. I use New-CMTaskSequenceDeployment cmdlet to create the deployment. The content of the TS should be downloaded before the start of the TS.
Works ok, but the -DeploymentOption DownloadAllContentLocallyBeforeStartingTaskSequence seems not to have any effect, when I check the deployment after the script ran, the option "pre-download content for this task sequence" isn't checked.
Same issue when I try Set-CMTaskSequenceDeployment.
Any hint from the community what I'm doing wrong?
...
# Create deployment for all waves now
foreach ($StrCollectionName in $ArrCollectionName)
{
$SchedulePhase2 = New-CMSchedule -Nonrecurring -Start $DateScheduleStartPhase2
Try {
$Deployment = New-CMTaskSequenceDeployment -CollectionName $StrCollectionName -TaskSequencePackageId $StrTaskSequenceID -DeployPurpose Required -AvailableDateTime $DateAvailablePhase1 -DeploymentOption DownloadAllContentLocallyBeforeStartingTaskSequence -SoftwareInstallation $False -SystemRestart $False -Schedule $SchedulePhase2 -RerunBehavior RerunIfFailedPreviousAttempt -AllowUsersRunIndependently $True -SendWakeUpPacket $True
Write-Host "Success - Deployment $Deployment created!"
}
Catch {
Write-Host "Error - Exception caught in creating deployment : $error[0]"
Exit
}
}
...
Looks like unfortunately (and unexpected) the pre-download behavior is different for package/program deployment and task sequence deployment.
In case of a package/program deployment the content download will start after start time in case the deployment has a mandatory time defined.
A TS deployment behaves different. It will start download when mandatory time (schedule) has been reached. Start time will be ignored.
This difference is independently from how the deployment has been started (Console or powershell cmdlet) therefore it is not an issue of the cmdlet.
First of all, you can check the picture below to make sure not to confuse these two options.
Difference between Preload content checkbox and Download all content locally before starting TS
Once done Here is my proposition :
Just by clicking, try to retrieve the property of you TSDeployment before and after you clicked the checkbox. You will see that one property changed. AdvertFlags
PS MUZ:\> (Get-CMTaskSequenceDeployment -DeploymentID MUZ200C5).AdvertFlags
[Convert]::ToString((Get-CMTaskSequenceDeployment -DeploymentID MUZ200C5).AdvertFlags,2)
Output :
34275328
10000010110000000000000000
From there, you can read from the MS doc : https://learn.microsoft.com/en-us/configmgr/develop/reference/core/servers/configure/sms_advertisement-server-wmi-class
From this, I learn that I need to change the 12th bit like this :
$advertflag = Get-CMTaskSequenceDeployment -DeploymentID MUZ200C5
$advertflag.AdvertFlags = $advertflag.AdvertFlags -bor "0x00001000"
$advertflag.put()
I hope it will help someone someday :)
I have been trying to install G assistant in to a Raspberry Pi3. I have question in the following link
https://developers.google.com/assistant/sdk/prototype/getting-started-pi-python/configure-audio
A partial text from above link
# Record a short audio clip. If you get an error, go to step 2.
$ arecord --format=S16_LE --duration=5 --rate=16k --file-type=raw out.raw
As expected I got error in this step. So I tried the Step2 created a new file (.asoundrc) with all the hardware info. Then I tried following
speaker-test -t wav
But I got following error ( If I rename .asoundrc I don't see this error but I cannot record)
speaker-test 1.0.28
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
WAV file(s)
ALSA lib conf.c:1697:(snd_config_load1) toplevel:9:17:Unexpected char
ALSA lib conf.c:3417:(config_file_open) /home/pi/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3788:(snd_config_update_r) hooks failed, removing configuration
Playback open error: -22,Invalid argument
How can I fix this?
Thanks!
That happens if your .asoundrc doesn't have the correct structure. Warning: If you use the rpi gui (desktop) volume control to change inputs it will modify the .asoundrc for you, breaking ALSA for google assistant. You'll have to go and fix it up. The instructions on google's website are correct.
To fix it delete the new entries created.
Then, at the top, look for the line 'type hw'. It has been sneakily modified... you'll have to change it back to 'type asym' to match the config google specify.
I leave the input/output for the gui (desktop) volume set to analogue and don't touch it once I start using google assistant so it won't go and mess with .asoundrc again.
I am using a Logitech USB headset and which has both mic & speaker (I don't use external speaker)
So, given my audio input and output goes to the headset, my .asoundrc looks like this:
pcm.!default {
type asym
capture.pcm "mic"
playback.pcm "speaker"
}
pcm.mic {
type plug
slave {
pcm "hw:1,0"
}
}
pcm.speaker {
type plug
slave {
pcm "hw:1,0"
}
}
Lastly, if you reboot your Pi, you'll have to reset the source path for the assistant binary, otherwise it won't be able to find the command that starts the assistant demo.
Do this by typing "source env/bin/activate"
Then you can run it again by typing "google-assistant-demo"
Good luck!
Yes I was seeing this error -- weirdly after I had everything working fine, i never thought that the .asoundrc file would have been corrupted.
Invalid value card arecord: main:722: audio open error: no such file or directory
I confirm that Xeneck Stoher says about the Rasbian gui volume/audio in/out selection messing up your ~.asoundrc file, replacing it fixed this issue and the recording / playback now works fine.
I'm trying to regroup three UDP streams in one mosaic, using VLC 2.0.5 on Windows 7. I don't need to stream it; but just to display it on my screen. But I'm doing it wrong, hope some one could help.
Here is my conf file :
new 1 broadcast enabled
setup 1 input "udp://#1.2.3.1:1234"
setup 1 output #duplicate{dst=mosaic-bridge{id=1,height=144,width=180},select=video,dst=bridge-out{id=1},select=audio}
new 2 broadcast enabled
setup 2 input "udp://#1.2.3.2:1234"
setup 2 output #duplicate{dst=mosaic-bridge{id=2,height=144,width=180},select=video,dst=bridge-out{id=2},select=audio}
new 6 broadcast enabled
setup 6 input "udp://#1.2.3.3:1235"
setup 6 output #duplicate{dst=mosaic-bridge{id=3,height=144,width=180},select=video,dst=bridge-out{id=3},select=audio}
new BackGround broadcast enabled loop
setup BackGround input "file:///C:/file.bmp"
setup BackGround output output #transcode{sfilter=mosaic,vcodec=mp2v,vb=500,scale=1}:bridge-in{delay=400,id-offset=100}:display
setup BackGround option file-caching=300
control 1 play
control 2 play
control 6 play
control BackGround play
And this is my command :
./vlc --color --vlm-conf --mosaic-width=360 --mosaic-height=288 --mosaic-keep-picture --mosaic-rows=2 --mosaic-cols=2 --mosaic-position=1 --mosaic-order=1,2,3,4 ."mosaic.vlm.conf"
After --vlm-conf you should specify the input vlm config file; You specified it at the end!
try this:
vlc --color --vlm-conf mosaic.conf --mosaic-width 360 --mosaic-height 288 --mosaic-rows 2 --mosaic-cols 2 --mosaic-order 1,2,3,4
At my company we have to test our apps in IE, but I prefer using Chrome as my default browser. I made the following simple batch script in an attempt to launch the link in IE if it's related to my company, or to launch it in Chrome otherwise. The script looks like below and seems to work well from the command line.
set url=%1
echo %url%|findstr /i companyname >nul:
if %errorlevel%==1 goto :co_not_found
:co_found
"C:\Program Files\Internet Explorer\iexplore.exe" %url%
goto :gensuite_end
:co_not_found
"C:\Program Files\Google\Chrome\Application\chrome.exe" %url%
:co_end
Now I've been trying for days to get this little doodad set as the default browser for my computer. Here's a list of some of the registry keys I've edited. For some reason, Windows is still using IE as the default browser.
HKEY_CURRENT_USER\Software\Clients\StartmenuInternet (Default) = DEFAULTBROWSER
HKEY_CURRENT_USER\Software\Classes\http (Default) = C:\browserFix.exe
HKEY_CURRENT_USER\Software\Classes\http\shell\open\command (Default) = C:\browserFix.exe
HKEY_CURRENT_USER\Software\Classes\https (Default) = C:\browserFix.exe
HKEY_CURRENT_USER\Software\Classes\https\shell\open\command (Default) = C:\browserFix.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\shell\open\command (Default) = C:\browserFix.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command (Default) = C:\browserFix.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet (Default) = DEFAULTBROWSER
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DEFAULTBROWSER (Default) = Default Browser, LocalizedString = C:\browserFix.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DEFAULTBROWSER\shell\open\command (Default) = C:\browserFix.exe
If I go to the control panel > programs > default programs > associate a file type or protocol and double click on HTTP or HTTPS, I'm only given the options for Google Chrome and IE. There is no browse option. In the end I'd like to be able to do this programmatically anyway. But to see if I could get it to show up I based these entries off of the ones for Google Chrome.
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DEFAULTBROWSER\Capabilities\StartMenu StartMenuInternet = Default Browser Fixer
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DEFAULTBROWSER\Capabilities\URLAssociations http and https = C:\browserFix.exe
It looks like Windows still isn't even looking at the program as a browser, much less the default one. Can anyone point me in the right direction? Keep in mind that I'd like to be able to do this with an installer batch script in the future.
Thanks in advance!
Jake
A program must have registry entries indicating that it can handle particular types of files. See http://msdn.microsoft.com/en-us/library/windows/desktop/ee872121(v=vs.85).aspx and links therefrom for details of the registry entries required in general, and http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx for how to register URI protocol handlers.
on webos, I have openssh running and would like to take a picture using the command line script.
I suspect this is going to include some luna-send command, or alternatively a gst-launch
But I am not having any luck with the docs.
webos doesn't have any of the expected capture tools, but I can access the /dev/video0 device.
Edit: i noticed that the touchpad has the ffmpeg utility installed, but it doesn't recognise the video4linux2 format
So far, I am trying Gopherkhan's suggestions with the following code;
luna-send -n 1 palm://com.palm.mediad.MediaCapture/startImageCapture \
'{"path":"/media/internal/foo1.png","options":[{"quality" \
:100,"flash":2,'reviewDuration':0,'exifData':{}}]}'
but its just hanging there doing nothing, after a while is says this;
{"serviceName":"com.palm.mediad.MediaCapture","returnValue":false,"errorCode":-1 \
,"errorText":"com.palm.mediad.MediaCapture is not running."} \
(process:8534): LunaService-CRITICAL **: AppId msg type: 17
So to do this with luna-sends is a bit tricky, and technically not supported.
You're probably going to want to hit the MediaCapture library, which can be found on the device here:
/usr/palm/frameworks/enyo/0.10/framework/lib/mediacapture
To include it in your enyo app drop the following in your depends.js:
"$enyo-lib/mediacapture/"
There are three main steps involved.
Initializing the component
Capturing the image
Unloading the device.
Here's a sample:
Declare the component in your scene
{
kind: "enyo.MediaCapture", name:"mediaCaptureObj",
onLoaded:"_setUpLoadedState", onInitialized:"_setUpInitializedState",
onImageCaptureStart:"_onImageCaptureStart", onImageCaptureComplete:"_onImageCaptureComplete",
onAutoFocusComplete:"_onAutoFocusComplete", onError:"_handleError",
onElapsedTime:"_onElapsedTime", onVuData:"_onVuDataChange", onDuration:"_onDuration"
}
Call the initialize method:
this.$.mediaCaptureObj.initialize(this.$.ViewPort);
In your onInitialized callback
Use the property bag to locate the number of devices that are available. Typically, the descriptions are "Camera/Camcorder", "Front Microphone", and "User facing camera"
var keyString;
for(var i = 0; i < this.pb.deviceKeys.length; i++)
{
if(this.pb.deviceKeys[i].description.indexOf("Camera/Camcorder") >= 0)
{
keyString = this.pb.deviceKeys[i].deviceUri;
break;
}
}
if(keyString)
{
var formatObj = {
imageCaptureFormat: this.pb[keyString].supportedImageFormats[0]
};
this.$.mediaCaptureObj.load(keyString, formatObj);
}
Take a photo.
var obj = {"exifData":"{\"make\": \"Palm\", \"model\": \"Pre3\", \"datetime\": \"2011:05:19 10:39:18\", \"orientation\": 1, \"geotag\": {}}","quality":90,"flash":"FLASH_ON"};
this.$.mediaCaptureObj.startImageCapture("", obj);
Unload the device:
this.$.mediaCaptureObj.unload();
To do this with the old JS frameworks, see:
https://developer.palm.com/content/api/reference/javascript-libraries/media-capture.html
Now, you can do something similar with luna-send, but again, I don't think it's technically supported. You might have trouble with starting-up/keeping-alive the media capture service, etc. BUT, if you want to try, you could do something along the lines of:
1. get the media server instance --- this returns a port instance number
luna-send -a your.app.id -i palm://com.palm.mediad/service/captureV3 '{"args":["subscribe":true]}'
This will return a location of the capture service with a port number, a la:
{"returnValue":true, "location":"palm://com.palm.mediad.MediaCaptureV3_7839/"}
Since this is a subscription, don't kill the request. Just open a new terminal.
2. Open a new terminal. Use the "location" returned in step 1 as your new service uri:
luna-send -a your.app.id -i palm://com.palm.mediad.MediaCaptureV3_7839/load '{"args":["video:1", {"videoCaptureFormat":{"bitrate":2000000,"samplerate":44100,"width":640,"height":480,"mimetype":"video/mp4","codecs":"h264,mp4a.40"},"imageCaptureFormat":{"bitrate":0,"samplerate":1700888,"width":640,"height":480,"mimetype":"image/jpeg","codecs":"jpeg"},"deviceUri":"video:1"}]}'
You should see:
{"returnValue":true}
if the call completed correctly. You can safely ctrl+c out of this call.
3. Take your picture. (you can ctrl+c out of the last call, and just supply the args here)
luna-send -a your.app.id -i palm://com.palm.mediad.MediaCaptureV3_7839/startImageCapture '{"args":["", {"exifData":"{\"orientation\": 1, \"make\": \"HP\", \"model\": \"TouchPad\", \"datetime\": \"2011:09:22 15:34:36\", \"geotag\": {}}","quality":90,"flash":"FLASH_DISABLED","orientation":"faceup"}]}'
Again, you should see:
{"returnValue":true}
if the call completed correctly.
You should hear a shutter click, and the image will show up in the Photos app, in your Photo Roll.
An alternative, which might some benefit of using cross platform tools, is to the use the gst-launch pipeline. So far I have managed to start the web cam using command line;
gst-launch camsrc .src ! video/x-raw-yuv,width=320,height=240,framerate=30/1
! palmvideoencoder ! avimux name=mux ! filesink location=test1.avi alsasrc !
palmaudioencoder
but not take a single image;
gst-launch -v camsrc .src_still take-picture=1 flash-ctrl=2 ! fakesink dump=true
but I can't get it to recognise the .src_still tab. I will update this answer with this alternative method as I proceed.