Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable printer for magic school bus only 2

Status
Not open for further replies.

emmons

Technical User
Oct 9, 2002
114
howdy,

how can I disable printing just for magic school bus only? I still want the kids to be able to print from encyclopedias and other programs. they are accidentally printing lots of stuff from magic school bus and using up lots of paper and toner.

what do you suggest?

thanks a lot!

emmons
 
Create a batch file which stops the print spooler and then launches Magic School Bus (???)

example (from notepad create a file call MagicSchoolBus.BAT)

net stop "Print Spooler"
c:\games\magic.exe

(where c:\games is the path of Magic School Bus (???) and magic.exe is the game's executable file.

You can choose to the delete the original game shortuct or replace it with this one. (Right click on the shortcut and choose properties. Type the path of your newly created BATCH file in the target field, like c:\games\magicschoolbus.bat)
 
thanks a bunch.

I have another question.

if the customer closes magic schoolbus or even leaves it open and then tries to print from another application (which we want them to be able to print from) will he/she be able to print?

Would the print spooler need to be started again?

 
Not on it's own. You can either run the print spooler start command manually (from services in control panel) or add it to the end of the batch file.

Manually -- go to control panel, admin tools, services. Find "Print Spooler" and right click on it and choose start.

Batch file -- at the very end of the batch file type:

pause
net start "Print Spooler"
 
Thanks again.

The child profile has no access to control panel, so that's one of the reasons why I like the batch file option.

So when does the command net start "Print Spooler" get executed. Is it when the child closes the magic school bus program?

the print spool is stopped
magic school bus application is started
something is paused
the print spooler is started

-emmons
 
Your batch file will look like this

net stop "Print Spooler"
c:\foldername\magic.exe
pause
net start "Print Spooler"
cls

The first line starts the spooler. The second line launches Magic School Bus. The third line pauses your batch file (waits for the Magic Bus program to close). The fourth line starts the print spooler the fifth line should close the batch file.
 

I will try this out and let you know how it goes.

Thanks again!

~emmons
 
OK, two things...

I log in as administrator, write the batch file, copy it into the child profile desktop and log off and log in as child.

I double click on the batch file icon but I get an "Access denied error". How do I enable access to the batch file to work from the child profile?

Also, I tried it in the admin profile and it works: the dos window opens, stops the printer, the magic school bus opens...when I exit magic school bus, I see the dos window again and I must hit a key to continue which starts the printer spool and closes the window. Can I make it automatically start the spooler and close the window upon exiting magic school bus?

Thanks again for your suggestions!
 
Hey emmons...

Where is your batch file located? Is it in a place that "child" has permissions to read? I'd check on that.

Dave
 
Alrighty then Dave. I just located the batch file on the desktop on the child profile. Perhaps I better put it in the same directory as the magic school bus program and just put the shortcut (not the batch file) on the desktop.

Perhaps that will solve it.

I don't remember where to look at those permissions. I haven't done it lately.

Any ideas on the second part of my question, about the dos window?

Kris
 
Sorry...you don't actually need the pause. I originally thought that the batch file would continue processing commands. In other words I thought it would actually start the Print Spooler immediately after launching Magic School Bus. But I just tested a similar batch file (using Notepad instead of Magic School Bus) and the batch file waits for the program to be closed before continuing. So edit your batch file so that it looks like this. (To edit the file you can locate it in Windows Explorer, right click on it and choose edit)

net stop "Print Spooler"
c:\foldername\magic.exe
net start "Print Spooler"

To check the permissions of a file: Right click, choose properties and go to the security tab.
 
doggone it.

I still get the Access to the specified device, path, or file is denied. I just can't run the batch file from the child profile.

Any help would be appreciated.


 
Try this....

Log in as administrator
Right click on the batch file
Choose properties
Go to the security tab
Highlight EVERYONE in the name box
(If "EVERYONE" is not there add "it")
Click the ALLOW checkbox next to "READ & EXECUTE" and READ.
Click APPLY
Click OK
 
No luck. I tried that.

This computer seems to be so tightened down. I wonder if it has anything to do with Centurion. Probably not.

Dang. So close, yet so far.......

Dunno what to do at this point.

The batch file does work beautifully if it would let me execute it.

Keep those ideas coming.

~emmons
 
From first glance, I'm sure it has to do with the rights for the user to start and stop services. Make sure they have access to do this
 
Thank you! This is getting very interesting.

I'm not at the library now and I won't be able to try this for a few days as I am going out of town. I will try it when I come back.

I really can't tell if it is refering to the fact that it can't open the file or can't stop the service.

My "hunch" is that it won't open the file but then I could certainly be wrong about that.

We'll get there eventually I hope. I'll get back to you in a few days. Have a nice holiday.
 
go to a cmd line and then run the .bat file you have created, if it starts to stop the service then you have run into a user security problem and not a file permissions problem.
 
Howdy again.

It turns out I am not going out of town after all. I can try something tomorrow before the library opens.

Thank you speedracercjr for your suggestion.

I highly doubt if I can get to a cmd line in the child profile. It's most likely disabled. But if you know a trick, let me know.

You'd think I could add a little something to the batch file before the stop printer statement to see if the dos window will even open at all in the child profile.
 
OK Here's what the Gates consultant said. I don't understand what he is saying to do in the last paragraph about breaking the batch file into three files and how that would work. Do you?
~~~~~~~~~~~~~~~~~~~~~~~~~~

First, when you try to run the batch file and you get the access denied error, it is because the batch file must use the executable CMD.EXE to process. We have restricted access to this file. You can edit the properties of CMD.EXE to add the Child account, or the Everyone group and grant them Read and Execute access.

This will allow the batch file to begin running. There is another problem. The patron accounts do not have the necessary level of permissions to stop and start services. When the batch file hits those commands, it will return an error, and the service will be unaffected. To fix this, you'll need to make Child (or whatever account you wish to have this level of access) a member of the Power Users group.

Now for the security concerns. We have restricted these things in our model in order restrict patrons from being able to do certain things that can adversely affect the performance of the computers. Granted you do have the Centurion Guards installed, so nothing would be permanent, but it can be a headache having to reboot every time a patron gains access to stop certain services or abuses
the access to a command prompt to engage in malicious activity.

One option, if possible (I don't know) is to break the batch file into a three. One that stops the service, one that starts the service and a third that calls both and then launches the MSB title. This would work if you can figure out a way to run the batch files to start and stop the service under another account, without logging out and back in. Again, I don't know if this is possible given
native Windows 2000 tools, or with the use of third-party software.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top