# batch file in startup folder



## bienpaul (Apr 20, 2006)

I have a program called defprint on C:\

I want to create a batch file that I can put in the All Users startup folder to run the defprint program when any user logs in.

What is the coding in the batch file to go with this line so that it will automatically run the program in the background.

C:\defprint /d IP_10.11.9.2

Thanks

Paul


----------



## Rollin' Rog (Dec 9, 2000)

I think all you need to do is create a shortcut to the program. On the shortcut > Properties > Target line, you can add the switch:

/d IP_10.11.9.2

after


C:\defprint

so that it reads:

C:\defprint /d IP_10.11.9.2

Put the modified shortcut in the All Users Startup folder.

Anyway, this question probably would be answered best in the "Development" forum where the experienced coders are more likely to be found.


----------



## StumpedTechy (Jul 7, 2004)

Either way works -

you can do something like -

@echo off
start C:\defprint /d IP_10.11.9.2

and save it to a batch file and put that in the startup

or as stated you can make a shortcut to "C:\defprint" and then add the /d IP_10.11.9.2 

There is one problem I have seen where some DOS based startups do not like the shortcut method but work fine in the batch file form. Either should work just fine for you.


----------



## bienpaul (Apr 20, 2006)

Thanks- Your suggestion worked great. I can now easily set the default printer for all users. Every other approach I tried was so involved.

Paul


----------

