Old 24th January 2014, 01:21   #1
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question Suspend Process When Start File With Nsis

hi
when i open a file in windows 64 bit then my file process suspended!
but when i open Manual the file,profess good start!
the code I am using for open file:


code:

ExecShell "open" "$R1Photoshop.exe"


and
code:

ExecDos::exec /NOUNLOAD /ASYNC '$R1Photoshop.exe"




What is the problem?
How do I fix the problem?
r2du-soft is offline   Reply With Quote
Old 24th January 2014, 01:39   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 901
ExecShell is for opening documents, not for running programs. Plus you're missing a backslash:
Quote:
Exec "$R1\Photoshop.exe"
and
Quote:
ExecDos::exec /NOUNLOAD /ASYNC '$R1\Photoshop.exe"

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 24th January 2014, 08:39   #3
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question

Quote:
Originally Posted by JasonFriday13 View Post
ExecShell is for opening documents, not for running programs. Plus you're missing a backslash:

and
Again process suspend!...
r2du-soft is offline   Reply With Quote
Old 24th January 2014, 09:46   #4
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question

i found a Clues...
if when open a file with code:

code:

ExecDos::exec /NOUNLOAD /ASYNC '$R1\Photoshop.exe"



then if I work with the system (For example:Refresh Desktop with F5) Then Process When Run Suspended! but i not Touching system then program (process) good work!
Is there a way to solve this problem?
Thank you
r2du-soft is offline   Reply With Quote
Old 24th January 2014, 15:31   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
ExecDos is for console applications when you need special control over stdin/stdout, just use Exec or ExecShell...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 24th January 2014, 15:52   #6
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question

Quote:
Originally Posted by Anders View Post
ExecDos is for console applications when you need special control over stdin/stdout, just use Exec or ExecShell...
Thank You
But what's the reason Suspend process, And what could it be?
r2du-soft is offline   Reply With Quote
Old 24th January 2014, 16:44   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Because ExecDos, nsExec and ExecWait will wait for the new process to finish before returning. Use Exec:

Exec `"$R1\Photoshop.exe"`
or
Exec `"$R1\Photoshop.exe" "$INSTDIR\somefile.psd"`
or
ExecShell open `$INSTDIR\somefile.psd`

Stu
Afrow UK is offline   Reply With Quote
Old 24th January 2014, 18:28   #8
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Again, the application process is Suspended.......
As Before:
if I work with the system (For example:Refresh Desktop with F5) Then Process When Run Suspended! but i not Touching system then program (process) good work!
Is there a way to solve this problem?
Thank you
r2du-soft is offline   Reply With Quote
Old 25th January 2014, 07:34   #9
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 901
Quote:
Originally Posted by r2du-soft View Post
Again, the application process is Suspended.......
As Before:
if I work with the system (For example:Refresh Desktop with F5) Then Process When Run Suspended! but i not Touching system then program (process) good work!
Is there a way to solve this problem?
Thank you
This indicates a problem with the program being run or (less likely) the operating system. Are you sure there are no viruses on the system? (this includes hacks running in the background).

What happens when you double click on the file that needs to be run? Does it still suspend?

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 25th January 2014, 07:51   #10
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question

Quote:
Originally Posted by JasonFriday13 View Post
This indicates a problem with the program being run or (less likely) the operating system. Are you sure there are no viruses on the system? (this includes hacks running in the background).

What happens when you double click on the file that needs to be run? Does it still suspend?
no,i have antivirus and always updated.system can not be a virus...
when i double click on the file,file run good! and process running...!
r2du-soft is offline   Reply With Quote
Old 25th January 2014, 08:27   #11
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 901
As stated before, don't use ExecDos, nsExec or ExecWait (these are for console programs). And remove this line from your script:
Quote:
ExecDos::exec /NOUNLOAD /ASYNC '$R1\Photoshop.exe"

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 25th January 2014, 09:16   #12
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question

Quote:
Originally Posted by JasonFriday13 View Post
As stated before, don't use ExecDos, nsExec or ExecWait (these are for console programs). And remove this line from your script:
i removed all exec but program process suspended again
r2du-soft is offline   Reply With Quote
Old 25th January 2014, 14:05   #13
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question

Hi

1-i test this Issue And the result was:
Family command "EXEC" not match with Windows 64 Bit And sometimes 86 (32) Bit!....
test:
i open a exe file whit command (ExecShell "open" "$R1Photoshop.exe") But Photoshop Process Suspended!....
I TEST AGAIN: i create a bat file whit Internal commands :
start /d "$R1" Photoshop.exe
and call to bat file in nsis with : ExecShell "open" "s.bat" But Process When start again SUSPENDED!
I TEST AGAIN: i open bat file with double click then process run good (normal)....

result test :
Family command "EXEC" not good work in 64 bit and sometimes 86 (32) Bit systems....


Question:
not void a exe file with a dll for start? i think this way worked! But it must be tested.



2-There is another possibility Its This perhaps my exe file is big and exec cant call that good! This could be the reason?


thanks to all friends

Last edited by r2du-soft; 25th January 2014 at 16:26.
r2du-soft is offline   Reply With Quote
Old 25th January 2014, 22:30   #14
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
I need a code that is not family EXEC code.
But that code open(run) a file (exe)? Or in any way except code exec......
thanks
r2du-soft is offline   Reply With Quote
Old 26th January 2014, 18:04   #15
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Question

Quote:
Originally Posted by r2du-soft View Post
Hi

1-i test this Issue And the result was:
Family command "EXEC" not match with Windows 64 Bit And sometimes 86 (32) Bit!....
test:
i open a exe file whit command (ExecShell "open" "$R1Photoshop.exe") But Photoshop Process Suspended!....
I TEST AGAIN: i create a bat file whit Internal commands :
start /d "$R1" Photoshop.exe
and call to bat file in nsis with : ExecShell "open" "s.bat" But Process When start again SUSPENDED!
I TEST AGAIN: i open bat file with double click then process run good (normal)....

result test :
Family command "EXEC" not good work in 64 bit and sometimes 86 (32) Bit systems....


Question:
not void a exe file with a dll for start? i think this way worked! But it must be tested.



2-There is another possibility Its This perhaps my exe file is big and exec cant call that good! This could be the reason?


thanks to all friends
Quote:
Originally Posted by r2du-soft View Post
I need a code that is not family EXEC code.
But that code open(run) a file (exe)? Or in any way except code exec......
thanks
Can Be Give By Nsis Run command file To the operating system?
r2du-soft is offline   Reply With Quote
Old 29th January 2014, 21:13   #16
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 343
Post

hi
my problem fixed with plug-in (run as user)....!
when start a exe file with exec command family in All windows 64 bit then my exec file process suspended!
When i use from (ShellExecAsUser plug-in) my problem fixed! and my exe file process run normally....
I used this plug-in:
http://nsis.sourceforge.net/ShellExecAsUser_plug-in

my code:
ShellExecAsUser::ShellExecAsUser "open" '$R1Photoshop.exe'

Maybe this code someday Solve you'rs problem

Thanks to all the friends of flowers
r2du-soft is offline   Reply With Quote
Old 29th January 2014, 22:05   #17
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
Your English is pretty hard to understand and you keep using the phrase suspended process. A suspended process (suspended thread really) can be created with the suspend parameter when you call CreateProcess() and Process Explorer can also suspend/resume processes but I imagine that you are actually talking about something else...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump