Jump to content

How to Run & Close an app during setup?


Nomadturk

Recommended Posts

Well, the thing is i'm trying to properly install AIMP2 to my windows.

Everything is going well till now, the only thing i lack is that AIMP needs to be Run once in order to run correctly. It associates all the file extensions now, as i want it to do but... it doesn't open files unless i manually open it once. After that, it works flawlessly for all users.

I've tried running aimp and closing it using tskill but the thing is once i run the command, it waits for aimp to be closed.

"%programfiles%\AIMP2\AIMP2.exe"
tskill AIMP2 /a
"%programfiles%\K-Lite Codec Pack\Media Player Classic\mplayerc.exe"
tskill mplayerc /a

It doesn't run line 2 unless one closes aimp2.exe and that just sucks.

Then i tried

"%programfiles%\AIMP2\AIMP2.exe" | tskill AIMP2 /a
"%programfiles%\K-Lite Codec Pack\Media Player Classic\mplayerc.exe" | tskill mplayerc /a

And that doesn't work as well.

Can somebody give me a clue how to do this, please?

Edited by Nomadturk
Link to comment
Share on other sites

I suppose this should work, eh? any better solutions? (Why couldn't think of this before? Damn!)

cd "%programfiles%\AIMP2"
start AIMP2
pause
tskill aimp2
exit

That pause will stop your installation sequence.

U may use PING 1.1.1.1 -n 1 -w 500 >NUL

System will try yo ping 1.1.1.1 for 0,5sec.

Then next command can kill aimp.

But i use another solution.

I have created a reg file, contains all file types which i want to associate with my program. U may use only 1 or 2 filetype commonly used.

Just install reg file and continue during setup.

After all done aimp will able to open that ommonly used file types. After first run, aimp can create entire filetype association list in registry, by himself.

Edited by eryen
Link to comment
Share on other sites

Ooops, that pause was not supposed to be there, i used it to check whether if aimp starts or not, then removed.

I also use a reg file that i've created (attached) and i'm installing it during installation. The thing is i don't want user to start aimp to register filetypes. I want it to be working flawlessly once installed.

About PING command, well,

PING 1.1.1.1 -n 1 -w 3500 >NUL

"%programfiles%\AIMP2\AIMP2.exe"

tskill AIMP2

doesn't work. It stops at second line again.

appAIMP.rar

Link to comment
Share on other sites

Start "%programfiles%\AIMP2\AIMP2.exe"

PING 1.1.1.1 -n 1 -w 3500 >NUL

tskill AIMP2

with reg file u dont have to make user start aimp once.

Just set for examle .mp3 files to aimp

All mp3 files will look like aimp.

After user opened a mp3 file (When ever he runs it), all other files will associate too.

User will not run AIMP, he will try to play mp3 file. ;)

Edited by eryen
Link to comment
Share on other sites

You don't get what i'm saying, eryen. (:

I'm saying that once i start AIMP2.exe the command sequence stops.

Also, even with reg, AIMP doesn't work properly.

Can you send me a copy of yours, if you don't mind?

Let me try with it once, just in case mine has something missing.

Link to comment
Share on other sites

I dont use aimp but i used that scrip for afew installation.

Maybe i can be your betatester to see what can i do.

OFF-TOPIC:

We are Turks, but we talking English. Because this is international topic.

Edited by eryen
Link to comment
Share on other sites

Hmm, now it works!

cmdow @ /HID

@ECHO OFF

cd "%programfiles%\AIMP2"

start /B aimp2.exe

PING 1.1.1.1 -n 1 -w 1500 >NUL

tskill AIMP2

The previous code i came up with didn't work but combining all these... Seems reasonable, now let me try it on a new installation and say if it'll work.

Thank you!

Off-Topic Comment(Click to Show)

Eryen, we are indeed talking in English even though we're of both same nationality since i've created this topic in an international area. But why did you mention this?

[Close]

Edited by Nomadturk
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...