#207281 - 2013-05-08 10:25 PM
Problems with logon script
|
MNTechy
Fresh Scripter
Registered: 2009-05-05
Posts: 18
Loc: Minnesota
|
So I have a logon script that maps all my user drives and put some shortcuts on users desks depending on what location they are at. We use PaperCutPro to monitor print usage, and one of the things they have is a monitor application that can tell the user how much money they still have left in their account. The application is supposed to live on a server share, and you are supposed to be able to run it from the share in your logon script.
So I put the command they recommended in a shell command:
shell "%comspec% \\<server>\pcclient\win\pcclient.exe /silent"
This did not work, the script never finished and the desktop doesn't come up. I've also tried:
shell "%comspec% start \\<server>\pcclient\win\pcclient.exe /silent" shell "\\<server>\pcclient\win\pcclient.exe /silent" run "%comspec% \\<server>\pcclient\win\pcclient.exe /silent" run "%comspec% start \\<server>\pcclient\win\pcclient.exe /silent" run "\\<server>\pcclient\win\pcclient.exe /silent"
If I turn debugging on in my script, I see the command run, and with some of the above run commands the pcclient window comes up, but when the script finishes and the desktop appears the pcclient is gone.
Does anyone have any thoughts on what I'm doing wrong? Thanks for your help!
Mike
|
|
Top
|
|
|
|
#207286 - 2013-05-08 11:44 PM
Re: Problems with logon script
[Re: ShaneEP]
|
ShaneEP
MM club member
   
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
|
This should in theory work fine however...
Shell '%comspec% /c "\\server\pcclient\win\pcclient.exe /silent"'
|
|
Top
|
|
|
|
#207289 - 2013-05-09 02:38 PM
Re: Problems with logon script
[Re: ShaneEP]
|
MNTechy
Fresh Scripter
Registered: 2009-05-05
Posts: 18
Loc: Minnesota
|
Yes, I was wrong, it has the dash... But I had it right in my script... I know it "should" work, but it isn't... Anyone have any thoughts on why it isn't? Again, when I turn on Kix debugging, I can see it start, but as soon as the main script finishes, and the desktop appears, the PC-Client disapears...
|
|
Top
|
|
|
|
#207292 - 2013-05-09 09:08 PM
Re: Problems with logon script
[Re: Glenn Barnas]
|
MNTechy
Fresh Scripter
Registered: 2009-05-05
Posts: 18
Loc: Minnesota
|
I tried building the command like Glenn suggested with the same result. Either way it appears the application starts, it just closes when the desktop appears.
I was wondering if this could have something to do with running the logon script synchronously through Group Policy? But I just changed that from Enabled, to Not Configured, to Disabled and I got the same behavior.
I have to think I'm missing something simple here!
|
|
Top
|
|
|
|
#207293 - 2013-05-09 09:15 PM
Re: Problems with logon script
[Re: MNTechy]
|
MNTechy
Fresh Scripter
Registered: 2009-05-05
Posts: 18
Loc: Minnesota
|
I also just ran the logon script after I was logged in (\\\netlogon\iplogon.bat) and the script runs, I see my debug window come up and the PCClient starts. However the Debug window stays up on the screen too, even after the main script finishes? Maybe that's normal behavior for the debug window? I can close it by clicking on the X in the corner.
My PCClient stays running if I run the script after logon, which leads me to believe it is running the logon script in a different context than the logged in user since it goes away if run during logon?
|
|
Top
|
|
|
|
#207294 - 2013-05-09 10:20 PM
Re: Problems with logon script
[Re: MNTechy]
|
MNTechy
Fresh Scripter
Registered: 2009-05-05
Posts: 18
Loc: Minnesota
|
So, it was the synchronous setting in Group Policy, it just took a reboot, not a logoff to take effect. So it's working now. I thought it used to be recommended to have synchronous on back in the day, but maybe that's changed... All seems to be working anyway...
Thanks! Mike
|
|
Top
|
|
|
|
#207296 - 2013-05-09 10:50 PM
Re: Problems with logon script
[Re: ShaneEP]
|
MNTechy
Fresh Scripter
Registered: 2009-05-05
Posts: 18
Loc: Minnesota
|
What I actually have that's now working is this:
RUN '\\print02\PCClient\win\pc-client.exe /silent'
The %comspec% worked but popped an error about trying to run a UNC path from a command line... No error this way.
But thanks for the reminder on the /c... I have to be more thorough when I post my examples and not just go from memory! Obviously that isn't working any more! LOL!
Mike
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Henriques)
and 2516 anonymous users online.
|
|
|