Cameyo

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Custom events not executing properly


Member

Status: Offline
Posts: 17
Date:
Custom events not executing properly
Permalink   
 


Hi,

I have a package were I need to connect two network shares.

I usually use something like this:

%COMPSPEC% /C if not exist r: net use r: \\servername\share

I entered this into the virtual application under custom events like this

Execute when: on start (unvirtualized)

Command to run: %COMSPEC%

Arguments: /C if not exist r: net use r: \\servername\share

 

but, when I start the application the network drives do not get connected. Do you have any idea what could fail here?



__________________


Guru

Status: Offline
Posts: 912
Date:
Permalink   
 

Hello Alienn,

Either of these should work:

1. Use cmd instead of %comspec%
2. If %comspec% is preferred, use it in a batch file and set Custom event to run the batch file



__________________


Member

Status: Offline
Posts: 17
Date:
Permalink   
 

O.k. when I use "cmd" instead of "%COMSPEC%" it works.
But then a dos windows is displayed for a short time.

Is there another way to connect a network drive without displaying anything to the enduser? Can I run shell commands silently?

 

 

Cheers,

Nicki



__________________


Guru

Status: Offline
Posts: 912
Date:
Permalink   
 

If your default command interpreter runs silently, you can use %%comspec%%; otherwise, a .vbs file will work without displaying anything.



__________________


Member

Status: Offline
Posts: 17
Date:
Permalink   
 

Will the vbs file be included in the App or is it necessary to be delivered with the app?

__________________


Guru

Status: Offline
Posts: 912
Date:
Permalink   
 

You can include it with the package by using Packager -AddScript [script_filename] [event_name] [wait/nowait] [package_file], e.g. Packager -AddScript C:\scripts\mapdrive.vbs OnStartUnvirtualized wait C:\packages\appname.cameyo.exe

Notes:

  • default location of Packager is %appdata%\VOS\Cameyo\PROG\%Program Files%\Cameyo
  • if you type an invalid event name, you will see a display of all possible event names


__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard