Powershell has it’s own environment and for this reason, I compiled ps1 to exe to avoid path problem for an old project.
My script just updated the background on the Windows 7 lock screen.
I'm French and I work in Luxembourg at the European School of Luxembourg.
Je parle français.
I speak english.
Ech schwätzen e bëssen Lëtzebuergesh.
This line works, correct:
powershell -ExecutionPolicy allsigned -File “C:\Program Files (x86)\FOG\tmp\fog_inst_office2010.ps1” -programme “P:\packages\audio video\vlc\inst_vlc.bat”
Not this one:
powershell -ExecutionPolicy allsigned -File “fog_inst_office2010.ps1” -programme “P:\packages\audio video\vlc\inst_vlc.bat”
Because powershell is executed from another folder.
The question is: which version is run by the snapin?
An easy workaround is to compile ps1 into an exe.
Yes, correct but… there is always a “but”… I have HP computers as well.
If what I want is possible, I will use FOG to boot computers on a custom linux iso or something else for specific request from the teachers.
I asked to the fog team not only for upgrading the bios but also for other purpose.
Oups I cannot answer this question. I let the expert saying something.
Nethertheless, I already used snapin with powershell script for an old project and I remember that I compiled the script into an exe (with “Powergui script editor” -> Tools -> compile script) to avoid any problem with path environment like powershell didn’t find the ps1.
I got problem myself without any argument, so with argument… it’s the hell on earth.
Please try to compile the office 2010 ps1 into an exe and try.
Greetings from France/Luxembourg.
-programme is not an argument recognized by powershell executable.
lebrun78 you wrote
“I checked powershell.exe -ExecutionPolicy allsigned -File -ExecutionPolicy allsigned -File “P:\packages\audio video\vlc\inst_vlc.bat” on the client it works.”
-File -ExecutionPolicy are defined twice, maybe it works but it’s not what you’re asking for. In your log, the plugin seems to run another command line because I see the -programme argument, please check your command line in the plugin.
I successfully created and ran a fdos iso from fog. The aim is to upgrade BIOS and then reboot automatically. Some other iso will follow to customize the BIOS.
The plugin ‘tasktypeedit’ is installed and, of course, an iPXE entry created.
Is there a way from the fog management to start a custom task and boot my custom ISO? I don’t want to spend too much time to upgrade 600 computers on a site of 10 hectares.
I read this post about the same subject but I don’t unterstand how I have to do.
Many thanks for your help,