/build/static/layout/Breadcrumb_cap_w.png

Creating a scheduled task with an MSI

I have seen another post on this, but it required a manual set of the AT command over the network, this is not what we want, we dont want a manual task.

We have an OU in our AD domain, with Kiosk lockdown settings in there, we want to reboot the machines in that OU on a nightly basis.

Also the only manual task involved should be the moving of the machine into that OU. Therefor the only way to create a scheduled task automatically would be to deploy an MSI to that OU.

Using Wise PS5.1, we have managed to create an EXE that creates the scheduled task (by running the AT and Shutdown commands within the EXE). However when I convert this to an MSI using Wise, it seems to strip these commands out.

The other problem doing it this way, when the machine gets moved out of the OU the scheduled task will remain, unless we code a nice uninstall routine, which I have done with the EXE, but also gets stripped when it gets converted to an MSI.

Anyone got a solution to this?

Thanks in advance.

0 Comments   [ + ] Show comments

Answers (6)

Posted by: Jim101 19 years ago
Orange Belt
0
Hi Colweb,

I have had a look at your post a couple of times; and one things keeps on jumping to mind......

Why can't you run the .EXE silently or alternatively use an MSI to call the EXE as a post execution?

This would probably overcome the issue you are having. I have been using WPS5.51 for a while now and not aware of any utility of WPS that actaully converts an EXE-MSI; unless you save as and recompile. Of course I could be missing something rather fundamental?!??!?!?!

Hope this kind of helps.

Cheers
Posted by: colweb 19 years ago
Yellow Belt
0
Hi Jim,

thanks for responding.

I am a definate NOOB in using WPS, so please bear with me :)

I have created the package using "Wise Script Editor", "Installation Expert". This created me an EXE, I then run "Legacy Setup Conversion" which gave me an MSI.

Its needs to be an MSI for the Active Directory to deploy it, but you could be right about using an MSI to call the EXE... or am I doing something completely stupid by using Script Editor then converting?

Sorry for my need of training, you know how it is, Im an admin coming up with a frig for a project, rather than a programmer/packager.

Thanks.
Posted by: Jim101 19 years ago
Orange Belt
0
No probs - ahhh yes the legacy convertor.

I have never had any real success with this when converting EXE's to MSI's. I did use it for converting NAI files to MSI's when we were converting from using WinInstall software to Wise.

I would suggest and this and this is by no means gospel personally I would create an MSI that installs, a text file/reg key/or the EXE file - anything really and then set a custom action that calls the EXE (such as Execute Program from Installed Files).

Set this on the MSI Script TAB and use the Execute Immediate TAB.

I would add the exceute command after the Install Finalise to ensure it is the last part to be installed.

Then give it a test and let us know how you get on. I will try and help where I can.

Regards
Posted by: colweb 19 years ago
Yellow Belt
0
Thanks, Im now doing it with Windows Installer Editor and using a VBS to do the scheduled task, thanks for your help.
Posted by: ds0934 19 years ago
Orange Senior Belt
0
If the machines reside on a network you can remotely reboot them using the SHUTDOWN command from a server or any designated client running as a scheduled task. I use CRONS (or Python Crons), a freeware UNIX port scheduler which runs under any context you want and I have it running a simple command line of SHUTDOWN -m \\machinename -r -f -t 30. This translates to reboot machine <i>machinename</i>, force any open apps or processes to close first and perform the reboot within 30 seconds. You can configure this locally (on the kiosk) as an administrator task using the local SYSTEM account if you don't have network access to it. Just offering another possible solution. We reboot hundreds of machines this way when a critical update is required over a weekend.
Posted by: colweb 19 years ago
Yellow Belt
0
ds0934,

thanks for the input. problem is i dont wany any manual intervention other than moving the computer account. The more tasks there are to perform manually the more chance of someone forgetting or the scheduling PC getting used for something else.

I have managed it with a simple MSI that runs a VBS file, which sets the scheduled task up for daily reboots. Works great, I am now working on the uninstall script to kill the task (so when the machine gets moved out, the task goes automatically).

Thanks everyone for their input, this site is a great resource and ill be using it more ! :)

Comments:
  • I was able to create Scheduled by running a VBS custom action when running MSI manually. However, when the same MSI is not creating Scheduled Task when running from SCCM. Please suggest. - Ajithkottadi 7 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ