chekfu
asked on
Unable to relaunch as Service in Terminal Server
Hi Experts
Please help. I have a GPO in the user logon vbscript in the following:
Set objShell = WScript.CreateObject("WScr ipt.Shell" )
'-------- DEFINE THE PROGRAM FILE LOCATION ---------
strExecuteFile = "\\tcf.local\Support\TSTem plate\bgin fo.exe /NOLICPROMPT /timer:0 /all"
'-------- DEFINE THE CONFIGURATION FILE LOCATION ---------
'strConfigurationFile = ("\\tcf.local\Support\TSTe mplate\TSW allpaper.b gi")
'-------- RUN COMMAND ---------
objShell.Exec strExecuteFile & strConfigurationFile
Users logon to Windows 2003 Terminal Server, encountered error message "Unable to relauch as a service".
Please help. I have a GPO in the user logon vbscript in the following:
Set objShell = WScript.CreateObject("WScr
'-------- DEFINE THE PROGRAM FILE LOCATION ---------
strExecuteFile = "\\tcf.local\Support\TSTem
'-------- DEFINE THE CONFIGURATION FILE LOCATION ---------
'strConfigurationFile = ("\\tcf.local\Support\TSTe
'-------- RUN COMMAND ---------
objShell.Exec strExecuteFile & strConfigurationFile
Users logon to Windows 2003 Terminal Server, encountered error message "Unable to relauch as a service".
Remove the "/all", that's where the message is coming from; to start with, users don't have permissions to write into other user's folders.
You don't need it anyway, because bginfo is started with each user's logon.
Oh, and make sure that the bitmap location defined in the bgi file is not at the standard setting (%Systemroot%\system32); change this to the user's Temp or Application folder.
You don't need it anyway, because bginfo is started with each user's logon.
Oh, and make sure that the bitmap location defined in the bgi file is not at the standard setting (%Systemroot%\system32); change this to the user's Temp or Application folder.
ASKER
Hello oBdA
You are right. I should removed "/all", however, it showed another error message:
========================== ========== ========== =
Error creating the output bitmap file
C:\WINDOWS\BGInfo.bmp:
Access is denied.
Please ensure the path the exists and you have permission to write it.
You can select a different output path for the bitmap using the Bitmap|Location menu item.
========================== ========== ========== =
I have confirmed again and again. The output bitmap is User's application data directory (%USERPROFILE%\Local Settings\Application Data\Winternals\BGInfo\BGI nfo.bmp). I have another bgi configuration file, the output bitmap is manually set to (%USERPROFILE%\Local Settings\Application Data\BGInfo\BGInfo.bmp).
I have still encountered the same error message when I double-click the vbscript file manually. BGINFO always prompt for saving onto C:\WINDOWS\BGinfo.bmp.
Please help!
You are right. I should removed "/all", however, it showed another error message:
==========================
Error creating the output bitmap file
C:\WINDOWS\BGInfo.bmp:
Access is denied.
Please ensure the path the exists and you have permission to write it.
You can select a different output path for the bitmap using the Bitmap|Location menu item.
==========================
I have confirmed again and again. The output bitmap is User's application data directory (%USERPROFILE%\Local Settings\Application Data\Winternals\BGInfo\BGI
I have still encountered the same error message when I double-click the vbscript file manually. BGINFO always prompt for saving onto C:\WINDOWS\BGinfo.bmp.
Please help!
Hi chekfu, I think that BGInfo does behave in a situation where it requires Admin rights (or at least specific rights to write to the Windows folder and certain parts of the registry). I think that to provide this ability, you will need to copy your TSTemplate folder into the NetLogon folder of a domain contoller. Then you can run a StartUp script, instead of a Login script, which will run under the system account, and you should be able to use the /all switch. So, once you have moved the folder, you can use this:
Set objShell = WScript.CreateObject("WScr ipt.Shell" )
'-------- DEFINE THE PROGRAM FILE LOCATION ---------
strExecuteFile = "\\domain.com\sysvol\domai n.com\scri pts\TSTemp late\bginf o.exe /NOLICPROMPT /timer:0 /all"
'-------- DEFINE THE CONFIGURATION FILE LOCATION ---------
'strConfigurationFile = ("\\domain.com\sysvol\doma in.com\scr ipts\TSTem plate\TSWa llpaper.bg i")
'-------- RUN COMMAND ---------
objShell.Exec strExecuteFile & strConfigurationFile
Regards,
Rob.
Set objShell = WScript.CreateObject("WScr
'-------- DEFINE THE PROGRAM FILE LOCATION ---------
strExecuteFile = "\\domain.com\sysvol\domai
'-------- DEFINE THE CONFIGURATION FILE LOCATION ---------
'strConfigurationFile = ("\\domain.com\sysvol\doma
'-------- RUN COMMAND ---------
objShell.Exec strExecuteFile & strConfigurationFile
Regards,
Rob.
Then it's not reading your bgi file.
Note that, as RobSampson already mentioned, the line where the bgi file to be used is commented out, so bginfo will run with default settings.
>' strConfigurationFile = ("\\tcf.local\Support\TSTe mplate\TSW allpaper.b gi")
Note that, as RobSampson already mentioned, the line where the bgi file to be used is commented out, so bginfo will run with default settings.
>' strConfigurationFile = ("\\tcf.local\Support\TSTe
ASKER
Hello RobSampson:
I just tried. Sorry to inform that it is still the same.
I just tried. Sorry to inform that it is still the same.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ah, great pick-up! Yes, maybe that will help.....
chekfu, notice that oBdA has placed an extra space ( & " " & ) in the objShell.Exec line....
Perhaps try that as a StartUp script.....
Regards,
Rob.
chekfu, notice that oBdA has placed an extra space ( & " " & ) in the objShell.Exec line....
Perhaps try that as a StartUp script.....
Regards,
Rob.
ASKER
Hello RobSampson
Your method works with below amendment done!! Really thanks a lot!!!
objShell.Exec strExecuteFile & " " & strExecuteOptions & " " & strConfigurationFile
Your method works with below amendment done!! Really thanks a lot!!!
objShell.Exec strExecuteFile & " " & strExecuteOptions & " " & strConfigurationFile
ASKER
Ooopsss.. really sorry!!
The award point goes to oBdA. Many thanks to oBdA.
The award point goes to oBdA. Many thanks to oBdA.
Excellent! No problem. Thanks for your help oBdA.
Regards,
Rob.
Regards,
Rob.
'strConfigurationFile = ("\\tcf.local\Support\TSTe
commented out? Without that line being executed, you are only executing the strExecuteFile, and not the configuration file. Would this be why it's trying to "relaunch" the application?
Regards,
Rob.