Jump to content


The Flying Carpenter

Established Members
  • Posts

    16
  • Joined

  • Last visited

  • Days Won

    1

The Flying Carpenter last won the day on January 10 2018

The Flying Carpenter had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

The Flying Carpenter's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. ah ! Thank you so much !! i`ve now made changes to my .ps1 so that it will either have succes or failure….instead of having the TS run a task in relation to the returncode of the script adding this code at the end of my script….and it works ! So now when a user clicks "cancel", the script fails, therefore the TS fails also….and thats what i want. If the user clicks "OK", the scripts is succesful and the TS continues. LogWrite "Ending DisplayMessage script... with returncode $ReturnCode" if ($ReturnCode = OK) {exit 0} elseif ($ReturnCode = Cancel) {exit 1} else { logWrite("script did not exit with 0, 1 or cancel") }
  2. Yes, that`s my issue. The Cancel = error step in the TS is checking to see if the return code is "1" in order to run. This would mean that the user clicked the "cancel" button in order to deffer the software install. If the return code is 1, the TS will run "cmd /c exit 1" which will cause the TS to fail. My problem is that even if the user clicks "OK" or "Cancel", the return code is always 0...….or maybe it`s the script that is not assigning the ReturnCode value. I`ve never done anything like this so i`m just trying to piece things together to make it work but no luck so far.
  3. here is my log after removing the # so that the line is no longer remmed out. there might be lots of unneded stuff in the log because i have a few other lines that are disabled in this TS. smsts.log
  4. Yes, i had it remmed out because i was testing without it but even without it being remmed out, it wasn`t working yesterday. I do have a step in my TS that checks for a TS sequence variable of "returncode" and if it`s equal to 1, it runs the command --> cmd /c exit 1 and this command should make the TS fail (that`s what i want) but it doesnt fail and it continues on to the next step of upgrading software even though the user selected to cancel it for now.
  5. i`ve got it to the point where the $returncode is good ...meaning if i run it manually, the value is 1 when i click Cancel and 0 when i click OK but how do i send that value back to the task sequence ? Here is the lower part of the script: # now show a popup message to the end user write-host $title $message [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”) $box = [Windows.Forms.MessageBox]::Show(“$message”, “$title”, [Windows.Forms.MessageBoxButtons]::OKCancel, [Windows.Forms.MessageBoxIcon]::Information) #$tsenv.Value("ReturnCode") = $ReturnCode Switch ($box) { "OK" { Write-Host "OK" $ReturnCode = "0" Exit 0 } "Cancel" { Write-Host "Cancel" $ReturnCode = "1" Exit 1 } }
  6. Niall, I have modified the script to have an OK and a Cancel button to give the clients an option to do a Microsoft Office version upgrade. How do i capture the response from the popup and use that response in the task sequence ? ie: if they press OK, task sequence would continu and if they press cancel, task sequence stops and doesn`t perform the next steps(office upgrade). Thanks
  7. i`d love to get WOL working as well. We are on sccm 1902. The option is there in the right click menu but does not work. it acts as if it will wake the client but nothing happens.
  8. tried again with --> if (($OperatingSystem -eq "Microsoft Windows 10 Enterprise") -or ($OperatingSystem -eq "Microsoft Windows 10 Entreprise")) Result in the log file is --> This is not an approved operating system for the Windows 10 Ugprade, exiting with code 99, detected: 'Microsoft Windows 10 Entreprise' So even though the spelling is exactly the same, it still fails. It`s OK….Checking for version number only is fine for me. Computers understand numbers better anyway :-)
  9. i didn`t try it with the If and -or but when i tried it with the french spelling only, the log wrote something like "did not find windows 10, continuing." and then obviously didn`t do the upgrade. I just checked the PC that i ended up upgrading last friday. Is it normal that we have to answer a bunch of questions when we first logon ? Is there a way to remove it ? Questions like, do you want to use Cortana, do you want to activate localization, do you want to use speach to text. This is OK for users but not OK for lab computers.
  10. Yes i had found the line 360 but even when i change it to the french word it still didn`t find windows 10 but i don`t know why because when i run "gwmi win32_operationsystem" manually on a computer, the output is exactly as i spell it. Anyways, i ended up omiting that section of code and now i`m only looking for the build number and that works. I also had to add a few lines at 395 in order to create the reg key HKCU:\software\"company name" because it previously didn`t exist….and if it doesn`t exist, it can`t subtract a deferal count. Thank you for your time, i think the changes i made will work for me.
  11. Thanks Niall, i was in fact using old files...the vbs versions. With the PS version, i found an issue though. we have our windows 10 OS in french so the OS name is diffrent than what you specify at line 361 of the wrapper.ps1. I ended up omitting those few lines of code to bypass it. The problem i have now is that it doesn`t launch the upgrade.hta so the user doesn`t see the popup window to accept. Can you point out where exactly the HTA is executed ? Thank you.
  12. I`m starting to test the use of this method for the second time. This time is to upgrade to 1809. Some users have reported to me that the defferal count has not been reset to the 8 times i have configured. If they defered 2 times during last Windows upgrade, they now have only 6 defferals left. Some had zero and where forced to do upgrade imediatly. Seems to me that the "HKCU\software\windowsnoob - NumberOfUpgradeDefers" is not getting reset after a succesful upgrade. How can i fix this ?
  13. Good Day Mr Brady, Just wanted to let you know that yesterday, i started using this script with a small group and found that the battery / ACpower detection part of the script doesn`t work. It was not detecting that the laptop was plugged in even though it was and battery was fully charged. I rem`ed out that part of the script to get around it and will tell the users to make sure they are plugged in during the upgrade.
  14. i get : Reboot Required ? Faux (our systems are in french). Then when i click "OK", i get a secound box that says "The Computer needs a reboot". Could it be because your script is looking for the word "False"
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.