tags:

views:

645

answers:

3

I have a program that changes my desktop wallpaper by dragging the picture file onto it. I also have a wireless network program that can auto open programs everytime it connects to a certain network.

I want to change my desktop everytime it connects to a certain network, but running the wallpaper program doesn't do anything unless I drag the picture onto it. However, I can also run a cmd prompt "c:/program.exe picture.jpg"

I tried creating a batch file START C:/PROGRAM.EXE PICTURE.JPG, but it doesn't work.

So basically I am trying to create a program that can run the cmd prompt "c:/program.exe picture.jpg" - can you help, please?

+1  A: 

A batch job should work. Try skipping that START from your example.

PEZ
+4  A: 

Remove the "start" from the batch file, and make sure any paths with spaces in them are enclosed in quotes, otherwise they'll be broken into arguments.

For example:

"C:\Program Files\MyProgram.exe" "C:\Documents and Settings\Me\MyPicture.jpg"

Bob Somers
A: 

Start - Run - Type : cmd /c "start /max ""C:\Program Files\MyProgram.exe"" ""C:\Documents and Settings\Me\MyPicture.jpg""" . The cmd /c - starts a new cmd instance and quits

YordanGeorgiev