עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VB לא מצליח להריץ קטע קוד

Featured Replies

פורסם

אני מפעיל מכונה וירטואלית עם XPMODE שמאפשר להפעיל אפליקציה מתוך המכונה הוירטואלית אל המכונה הפיזית .

כאשר מפעילים את הפליקציה הכל זה עובד מעולה . וכאשר סוגרים אותה. לאחר 5 דקות המכונה הוירטואלית ברקע נסגרת

חיפשתי ומצאתי את זה http://blogs.technet.com/b/windows_vpc/archive/2009/11/09/auto-start-and-close-options-for-windows-virtual-pc.aspx

ואני מאוד מעוניין לדעת כיצד להפעיל את הסקריפט הזה Script #4: Set VM to Never Hibernate

העתקתי את הקוד

1: Option Explicit  ' Force explicit variable declaration.  
2:
3: Dim defaultVMTag, defaultVM, objArgs, objVPC, vmName
4: Set objArgs = WScript.Arguments
5: Set objVPC = CreateObject("VirtualPC.Application")
6:
7: defaultVMTag = "default_vm"
8: defaultVM = objVPC.GetConfigurationValue(defaultVMTag)
9:
10: if objArgs.Count < 1 Then
11: WScript.Echo "Syntax: cscript <scriptname>.vbs <”VMName”>"
12: WScript.Echo "Considering default VM."
13: vmName = defaultVM
14: Else
15: vmName = objArgs(0)
16: End if
17:
18:
19: SetValue()
20:
21: Sub SetValue()
22: Dim vmcTag, objVM
23: vmcTag = "ui_options/seconds_to_save"
24: Set objVM = objVPC.FindVirtualMachine(vmName)
25: if objVM is Nothing Then
26: WScript.Echo "VM not found: """ vmName """"
27: Else
28: objVM.SetConfigurationValue vmcTag, 0
29: WScript.Echo "VM: """ vmName """ set to never hibernate"
30: End if
31: End Sub

בפרמטר default_vm שיניתי לשם של המכונה שלי . וכל הזמן נתן לי הודעות שגיאה ולא הצליח

נתן הודעת שגיאה " שורה 1 תU 1 . נדרש משפט . 80010400 שגיאת קומפילציה של VBSCRIPT

אז מחקתי את המספרים בצד

וקיבלתי הודעת שגיאה " שורה 8 , תו 1 . לא היתה אפשרות לאחזר את ערך התצורה המפתח לא נימצא . מקור: VirtualPC.Application.1

תודה לעוזרים .

פורסם
  • מחבר

מצאתי פיתרון .

לפתוח את קובץ ההגדרות של המכונה . xpmode.vmc ( זה יכול להיות כל שם אחר שנתתם למכונה )

קליק ימני פתח באמצעות פנקס רשימות . ולהוסיף את השורה

<seconds_to_save type="integer">0</seconds_to_save>

לדוגמא :

 
</virtual_machines>
<multi_channel type="boolean">true</multi_channel>
<ui_options>
<guest_rail_enabled type="boolean">true</guest_rail_enabled>
<window_xpos type="integer">54</window_xpos>
<window_ypos type="integer">55</window_ypos>
<full_screen type="boolean">false</full_screen>
<resolution_height type="integer">581</resolution_height>
<resolution_width type="integer">952</resolution_width>
<cred_id type="string">tazcomp</cred_id>
<seconds_to_save type="integer">0</seconds_to_save>
</ui_options>

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.