Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: 2 Questions  (Read 2699 times)

0 Members and 1 Guest are viewing this topic.

Rubenos

  • Guest
2 Questions
« on: July 04, 2006, 02:21:51 PM »
Hi,

I'm new here and to all the batch thingies so here are the questions.

1. What kinda code do I need to directly close my batch file, i want the batch file to run a .msi file cause Autorun.inf doesn't support .msi files. BUT i want that if the .msi file is started the batch file is closed directly so that it flashes for 1 sec. and runs the .msi file.
2. Is there a code 2 make a space cause the .msi file is named File Executer for example and i can't remove the space cause the msi needs the orginal file name to extract some files.

Thanks in advance!

Greetz Ruben

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: 2 Questions
« Reply #1 on: July 04, 2006, 02:31:12 PM »
Had trouble making heads or tails of this but,

#1 use the start command so the installer and the batch file run in two separate windows. If necessary add an exit statement to the batch file to close the batch CMD window.

#2 Whenever you have embedded spaces, quote the entire string (ie. the fully qualified path name and the program name)

ie: "c:\yourdirectory\File Executer.msi"

Hope this helps.  8-)
« Last Edit: July 04, 2006, 02:40:02 PM by Sidewinder »
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Rubenos

  • Guest
Re: 2 Questions
« Reply #2 on: July 05, 2006, 09:49:59 AM »
Thanks but they didn't work :( the first one is nog so important but the second 1 is so...

If i type in notepad using this:

ie: "Adobe Photoshop CS2.msi"
ECHO
CLS

Because the msi is Adobe Photoshop CS2.msi in the same map so i didn't need to put the full path in it, but it doesn't work. Thanks in advance anyway!

Greetz Ruben

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: 2 Questions
« Reply #3 on: July 05, 2006, 10:46:58 AM »
There was a miscommunication in the previous post, the "ie:" was not to be included in the batch file.

Code: [Select]
start c:\windows\system32\msiexec.exe "Adobe Photoshop CS2.msi"
exit

You could also try:

Code: [Select]
"Adobe Photoshop CS2.msi"
exit

The only difference is the second version assumes that msi files are associated with the windows installer program where the first example makes no such assumption.

Good luck. 8-)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Rubenos

  • Guest
Re: 2 Questions
« Reply #4 on: July 05, 2006, 11:37:32 AM »
Thanks it works!

Rubenos

  • Guest
Re: 2 Questions
« Reply #5 on: July 08, 2006, 04:02:01 AM »
Because my first question didn't work (or i didn't understand it), is there a code to minimize the bat file when he's running processes?

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: 2 Questions
« Reply #6 on: July 10, 2006, 05:11:41 AM »
You might try using the command:

Code: [Select]
start /min yourbatch.bat
You should run this from the Windows Run Box (Start==>Run).

Quote
when he's running processes
Without knowing the requirements of these processes, it's hard to tell. Trial and Error is a great way to learn.

 8-)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein