Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Is there a work around for Permission Denied Code 0 without having to touch read-write permissions

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,60315
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Is there a work around for Permission Denied Code 0 without having to touch read-write permissions
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Is there a work around for Permission Denied Code 0 wit... - 5/17/2008 12:41:58 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
http://www.visualbasicscript.com/m_60305/tm.htm   << In reference to this.

Or am I just whistling dixxy out of my a*s?
 
 
Post #: 1
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 2:10:03 AM   
  dm_4ever


Posts: 2665
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
What is your end and final goal????

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TKS)
 
 
Post #: 2
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 4:51:08 AM   
  yfki

 

Posts: 78
Score: 0
Joined: 12/12/2007
Status: offline
 If I understand what your trying to do is some type of remote script execution, then I may have a solution for ya.

I have a script you may be able to use some pieces of it, depends on having admin access, or dimain admin etc, was used to install VNC on a remote machine and kick start the process.
Moments later you could VNC to the remote machine. Even removed the VNC icon from the system tray so the users had no idea the remote machine was being accessed.

I don't see why this cant be applied to your situation.

Starting the proces/app/vbs can be done in few ways
  • Either schedule a task on the machine to execute in the future
  • Or copy the vbs over to the remote machine, and maybe use something like below, you will need to tweak etc...


      

< Message edited by yfki -- 5/17/2008 5:49:11 AM >

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 5:30:00 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
quote:

ORIGINAL: dm_4ever

What is your end and final goal????


Hi dm_4ever,

My end and final goal would be to execute the following vbscript from another workstation over my Network LAN without having to change read-write permissions:

quote:

const forreading=1, forwriting=2, forappending=8
set filesys = createobject("scripting.filesystemobject")
set filetxt = filesys.opentextfile("log.txt", forappending, true)
filetxt.writeline ("")
filetxt.close


(in reply to dm_4ever)
 
 
Post #: 4
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 5:59:20 AM   
  yfki

 

Posts: 78
Score: 0
Joined: 12/12/2007
Status: offline
http://www.dalun.com/blogs/05.09.2007.htm

Use WMI to Run Commands on Remote Machine

It is very common that you need to run some commands on a remote server. For example, you may want to config your source control server to start a build process on a dedicated build machine once it receives any checkins. To achieve this, you can leverage the WMI scripting APIs.

The steps are:

  1. Use SWbemLocator to create Locator object
  2. Use the Locator object to connect to the remote server and get back a Service object
  3. Use the Service object to get a Win32 process object
  4. Finally, use the Process object to issue your command

WMI WbemScripting script sample:

      

(in reply to TKS)
 
 
Post #: 5
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 6:00:36 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
quote:

ORIGINAL: yfki

If I understand what your trying to do is some type of remote script execution, then I may have a solution for ya.

I have a script you may be able to use some pieces of it, depends on having admin access, or dimain admin etc, was used to install VNC on a remote machine and kick start the process.
Moments later you could VNC to the remote machine. Even removed the VNC icon from the system tray so the users had no idea the remote machine was being accessed.

I don't see why this cant be applied to your situation.

Starting the proces/app/vbs can be done in few ways
  • Either schedule a task on the machine to execute in the future
  • Or copy the vbs over to the remote machine, and maybe use something like below, you will need to tweak etc...


      


Hi yfki,

I don't know the exact terminology, but remote script execution sounds about right... I think.
As for the script you gave me, it looks a bit beyond my current knowledge of vbs etcetera.

-TKS

(in reply to yfki)
 
 
Post #: 6
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 6:02:09 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
http://www.pctools.com/guides/scripting/detail/108/?act=reference

^^^ What about a WScript.Network Object? Would this help?

(in reply to TKS)
 
 
Post #: 7
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 6:10:59 AM   
  yfki

 

Posts: 78
Score: 0
Joined: 12/12/2007
Status: offline
You will have to map the drive, copy the .vbs file over, then run.
Or feel the cmd line enough so that you could essentially create the file on the remote system.

IMHO, it would be much easier to just map a drive and copy the file over and just execute.
This works perfectly for me, try it and let me know how it goes.



      

< Message edited by yfki -- 5/17/2008 6:14:49 AM >

(in reply to TKS)
 
 
Post #: 8
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 7:22:56 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
quote:

ORIGINAL: yfki

You will have to map the drive, copy the .vbs file over, then run.
Or feel the cmd line enough so that you could essentially create the file on the remote system.

IMHO, it would be much easier to just map a drive and copy the file over and just execute.
This works perfectly for me, try it and let me know how it goes.



      


Hey yfki,

To be honest, all my knowledge of vbs comes purely from hand-hand experience, so "maping a drive" and the rest seams pretty foreign to me.

Perhaps you could simplify it for me?

Perhaps I should start looking into WMI?

(in reply to yfki)
 
 
Post #: 9
 
 RE: Is there a work around for Permission Denied Code 0... - 5/17/2008 10:03:21 AM   
  yfki

 

Posts: 78
Score: 0
Joined: 12/12/2007
Status: offline
Try this.....


      

< Message edited by yfki -- 5/17/2008 10:05:31 AM >

(in reply to TKS)
 
 
Post #: 10
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Is there a work around for Permission Denied Code 0 without having to touch read-write permissions Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts