Link to home
Start Free TrialLog in
Avatar of ilungachris
ilungachris

asked on

File download message box when I run the logon script

Hi,
I have a batch file runing as a logon script, and the file is in \\Mainserver\Netlogon
The script connect a network printer to workstation according to room where the user is.
When a user logon, there is a file download message box saying that the file can hamr your computer .... OPEN or CANCEL
What can I do to avoid this message box if possible by using group policy.
Avatar of adonis1976
adonis1976

run the batch scriot in a silent mode. i guess you need to use some switch for it. if i'm not wrong, it is something like,

something.bat -i

where somethin.bat is ur batch file and -i will disable the interactivity.

so it will be : somethin.bat(space)-i
Avatar of ilungachris

ASKER

it doesn't work. I think i have that message box because of the fact that the file i WANT to run in not a local so the message comes before the program runs and i can only either run it by clicking on open or cancel
Could you post your script you are using?
The fact is any file located in the Netlogon folder I try to run comes with a warning message telling me .. some files can harm your computer. if the file information below looks sucpiciousm or you do not fully trust the source do not open or save the file.

I do not want to see this message.

here is the batch file :

@echo off

IF %COMPUTERNAME%.==LIBRARY1. GOTO library
IF %COMPUTERNAME%.==LIBRARY2. GOTO library
IF %COMPUTERNAME%.==LIBRARY3. GOTO library
IF %COMPUTERNAME%.==LIBRARY4. GOTO library
IF %COMPUTERNAME%.==LIBRARY5. GOTO library
IF %COMPUTERNAME%.==LIBRARY6. GOTO library
IF %COMPUTERNAME%.==LIBRARY7. GOTO library
IF %COMPUTERNAME%.==LIBRARY8. GOTO library
IF %COMPUTERNAME%.==LIBRARY9. GOTO library
IF %COMPUTERNAME%.==LIBRARY10. GOTO library
IF %COMPUTERNAME%.==LIBRARY11. GOTO library
IF %COMPUTERNAME%.==LIBRARY12. GOTO library
IF %COMPUTERNAME%.==HSLAB1. GOTO hslab
IF %COMPUTERNAME%.==HSLAB2. GOTO hslab
IF %COMPUTERNAME%.==HSLAB3. GOTO hslab
IF %COMPUTERNAME%.==HSLAB4. GOTO hslab
IF %COMPUTERNAME%.==HSLAB5. GOTO hslab
IF %COMPUTERNAME%.==HSLAB6. GOTO hslab
IF %COMPUTERNAME%.==HSLAB7. GOTO hslab
IF %COMPUTERNAME%.==HSLAB8. GOTO hslab
IF %COMPUTERNAME%.==HSLAB9. GOTO hslab
IF %COMPUTERNAME%.==HSLAB10. GOTO hslab
IF %COMPUTERNAME%.==HSLAB11. GOTO hslab
IF %COMPUTERNAME%.==HSLAB12. GOTO hslab
IF %COMPUTERNAME%.==HSLAB13. GOTO hslab
IF %COMPUTERNAME%.==HSLAB14. GOTO hslab
IF %COMPUTERNAME%.==HSLAB15. GOTO hslab
IF %COMPUTERNAME%.==HSLAB16. GOTO hslab
IF %COMPUTERNAME%.==HSLAB17. GOTO hslab
IF %COMPUTERNAME%.==LABSERVER. GOTO hslab
GOTO out

:library
rundll32 printui.dll,PrintUIEntry /dn  /n \\LIBRARY11\HPDeskje /q
rundll32 printui.dll,PrintUIEntry /y /in  /n \\LIBRARY11\HPDeskje /q
GOTO out



:hslab
rundll32 printui.dll,PrintUIEntry /dn  /n \\hslab2\hp5550 /q
rundll32 printui.dll,PrintUIEntry /y /in  /n\\hslab2\hp5550 /q
GOTO out
did that link help you at all?
Thanks for hte link.
I read the it but in that case  the batch file is saved on the systemroot i am dealing with a network location that's why I am having this message.
Can you give us a little more information?  Are these all windows 2000 workstations?  The message that says the file is harmful, can you describe the error more?  Is the error coming from Windows, virus scanner, etc?  You might also try running it from the command prompt and see if you get the same error.  As well as logging in as an administrator and running it from the command prompt.  Also, you could try running rundll32 without the printui.dll or load another dll to verify if it is the rundll32 causing the problem or if it is the printui.dll causing the problem.
The server is a DC win 2003 with AD
Workstations are xp pro
The file works fine in command prompt
But every time I try to run it I have that confirmation message before it runs. The message is not from an antivirus it's a windows message.
I think i can find something in the folder options. i am still looking...
But I would like to do it with GP
thanks
I am doing the same thing with a vb script and I don't have the problem anymore.
Thanks any way
This question will be closed
ASKER CERTIFIED SOLUTION
Avatar of PashaMod
PashaMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial